home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / jx4nt125.zip / DOC / JAX4TH.DOC
Text File  |  1994-10-10  |  99KB  |  2,423 lines

  1. Jax4th for Windows NT is Copyright 1993, 1994
  2. by Jack J. Woehr, PO Box 51, Golden, CO 80402-0051
  3. jax@well.sf.ca.us 72203.1320@compuserve.com SYSOP RCFB (303) 278-0364
  4. All Rights Reserved.
  5. NOTE: This document is formatted to a maximum of 120 characters per line.
  6. With a 640x480 display, Alan Phillips's PFE editor for NT using the screen
  7. font Lucida Sans Typewriter 7 is best for viewing.
  8.  
  9. The Gnu Public License is Copyright (C) 1988, 1990, 1991, 1992, 1993
  10. Free Software Foundation, Inc.
  11.  
  12. *********************************************************************
  13. This program is free software; you can redistribute it and/or modify
  14. it under the terms of the GNU General Public License as published by
  15. the Free Software Foundation; either version 2 of the License, or
  16. (at your option) any later version.
  17.  
  18. This program is distributed in the hope that it will be useful,
  19. but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21. GNU General Public License for more details. (see COPYING.TXT)
  22.  
  23. You should have received a copy of the GNU General Public License
  24. along with this program; if not, write to the Free Software
  25. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26. *********************************************************
  27.  
  28.     ***For a Quick Start, see the "Invoking Jax4th" section below in this document.***
  29.  
  30. PRELIMINARY DOCUMENTATION -- to be finished Real Soon Now :-)
  31. -------------------------------------------------------------
  32.     This preliminary documentation file is still undergoing revision, as is the Jax4th system itself. This
  33. documentation is not yet complete, but attempts in as far as it is complete to conform to the documentation
  34. requirements imposed by the ANS/ASC X3/X3J14 Standard for Forth (ANSI/IEEE X3.215-1994) in Chapter Four
  35. "Documentation Requirements" of that draft. A GLOSSARY IS AT THE END OF THIS DOCUMENT.
  36.  
  37.     - To be kept up-to-date on Jax4th, see the heading "OPTIONAL SHAREWARE REGISTRATION" below.
  38.  
  39.     - For information on Jax4th's TOTAL LACK OF WARRANTY, see the Gnu Public License in the file LICENSE.TXT in
  40. the distribution archive in which your received this file. If you did not receive the license, you do not have a
  41. licensed copy of Jax4th.
  42.  
  43.     - For information on your license to use and right to distribute this free system, see Gnu Public License,
  44. vide infra (how's *that* for lawyer talk?!).
  45.  
  46.     - For information on X3J14 and the draft proposed Standard, contact the X3J14 Technical Committee, c/o
  47.       Elizabeth Rather, Chair, 111 N. Sepulveda Blvd., Suite 300, Manhattan Beach, CA 90266.
  48.  
  49. Welcome to Jax4th for Windows NT Version 1.x!
  50. ---------------------------------------------
  51.     Jax4th is a minimal model Forth system. The design goals are as follows:
  52.  
  53.     1) Provide a fun freeware Forth for Windows NT which is as complete, usefula and easy to use as is practical
  54. in the limited amount of time the author has to develop and maintain it.
  55.  
  56.     2) Provide a Forth as described above which emphasizes the model promulgated by the ANS/ASC X3/X3J14 Technical
  57. Committe for ANS Forth.
  58.  
  59.     LATE NOTE: As Elizabeth Rather, Chair of X3J14 posted on USENET April 19, 1994:
  60.  
  61.     "I'm happy to inform you that, according to Lynn Barra of X3, the ANSI BSR 
  62.     letter ballot for final approval of ANS Forth passed.  Lynn believes they 
  63.     will take about 2 mos. to publish the document, and will issue a press 
  64.     release when it is ready."
  65.  
  66.     For a Quick Start, see the "Invoking Jax4th" section below in this document.
  67.  
  68. What Jax4th is Not
  69. ------------------
  70.     Jax4th is not an optimizing compiler targeted at professional development. The author did not dream of
  71. providing in two hundred (200) hours of his time a freeware Forth to compete with professional systems which required
  72. thousands of hours of programmer time to complete. For a professional Forth development environment for Windows 3.1 or
  73. for Windows NT, please contact a Forth vendor, for instance, one of the organizations listed below (in alphabetical
  74. order):
  75.  
  76.     FORTH, Inc.
  77.     111 N. Sepulveda Blvd.
  78.     Manhattan Beach, CA 90266
  79.     1-800-55-FORTH
  80.     
  81.     Laboratory Microsystems, Inc. (LMI)
  82.     P.O. Box 10430
  83.     Marina del Rey, CA 90295
  84.     1-310-306-7412
  85.  
  86.     Microprocessor Engineering, Ltc. (MPE)
  87.     133 Hill Lane
  88.     Surrey, Southampton SO1 5AF
  89.     England
  90.     +011-44-703-631441
  91.  
  92. About Forth
  93. -----------
  94.     The author of Jax4th has written two books on Forth:
  95.  
  96.      _Forth: The New Model_, Jack Woehr M&T Publishing, 1992, ISBN 1-55851-277-2 (about dpANS-Forth);
  97.      _Seeing Forth_, Jack Woehr, Offete Enterprises, 1992 (about Forth history and philosophy).
  98.  
  99.     Both of these books, as well as many others fine Forth books by many fine authors, may be
  100. mail-ordered from:
  101.  
  102.         The Forth Interest Group
  103.         P.O. Box 2154
  104.         Oakland, CA 94621
  105.         1-510-89-FORTH
  106.  
  107. DISCLAIMERS
  108. -----------
  109.     1) JaxFamousFreewareDisclaimer:
  110.  
  111.      ******************************************************************
  112.     * NO WARRANTY NO GUARANTEE NO SOAP RADIO, YER' ON YER OWN, SIS/BUB! *
  113.      ******************************************************************
  114.  
  115.     2) All trademarks mentioned herein are the property of their owners. The owners are so obvious as not to bear
  116. mentioning, other than to tell you once that "Windows NT is a trademark of Microsoft". Duh.
  117.  
  118.     3) The draft proposed Standard for Forth is the work of the ANS/ASC X3/X3J14 Technical Committee, a committee
  119. accredited to CBEMA and the American National Standards Institute. Please note that when the phrase "ANS Forth" appears,
  120. it refers to the model of Forth which will result from the X3J14 Technical Committee's deliberations, once promulgated
  121. by the American National Standards Institute. The draft was recently reported as having been passed by X3, see note above.
  122.  
  123. LICENSE & DISTRIBUTION
  124. ----------------------
  125.     Jax4th is licensed under the GNU public license.
  126.  
  127.     For information on the GNU public license, read the file LICENSE.TXT or please contact the Free Software
  128. Foundation, Inc., 675 Mass. Ave., Cambridge, MA 02139.
  129.  
  130.     This free software is not warrantied or guaranteed in any fashion. I just happen to like it ...
  131.  
  132. OPTIONAL SHAREWARE REGISTRATION
  133. -------------------------------
  134.     Jax4th is GNU-style Freeware, but if you send a $25.00 donation to the author:
  135.  
  136.     Jack Woehr
  137.     PO Box 51
  138.     Golden, CO 80402-0051
  139.  
  140.     accompanied by an internet email address, you will be kept posted on major upgrades (including later additions
  141. to this documentation!!) via UUENCODEd .ZIP files. Your registration will last for one (1) year from the date it is
  142. received. PLEASE SEND U.S. CHECK OR MONEY ORDER ONLY ... NO CASH NO CREDIT CARDS NO FOREIGN CHECKS.
  143.  
  144.     Your donation is entirely voluntary, since from time to time I will post these same files to public download
  145. sites. Your donation simply expresses respect for the author and adds to your convenience in keeping up with upgrades
  146. to this model Forth system. Since your donation is voluntary, no extension of Jax4th's complete NON-WARRANTY is
  147. effected by such donation: JAX4TH IS NEVER SOLD.
  148.  
  149.     All tech support is currently provided via the RCFB BBS (303) 278-0364. (J)oin JAXWARE when you are there.
  150. No tech support is promised for this free software, but it's my BBS, so I'll be there maybe.
  151.  
  152. Invoking Jax4th
  153. ----------------
  154.     Doubleclick on JAX4TH.EXE in File Manager, or doubleclick the Jax4th icon in a program
  155. group or icon bar to start Jax4th for Windows NT.
  156.  
  157.     Alternatively type JAX4TH to start the system. Any other valid Forth commands entered
  158. on the command line will be executed before the Jax4th logo is displayed and QUIT is performed.
  159. If you have a saved dictionary, e.g., FOO.DIC, you may reload it on the command line and execute
  160. commands from it
  161.  
  162.     C:\>jax4th RELOAD FOO.DIC MY-WORD BYE
  163.  
  164. for example.
  165.  
  166.     Use CAPS LOCK ON since Jax4th's interpreter is case sensitive and most system words are in UPPERCASE.
  167.  
  168.     JAX4TH gives you a compiler/interpreter with no mass storage facilities. User dictionary is 32K, data space is
  169. 32K. Both will overflow silently if exhausted.
  170.  
  171. Saving a Dictionary
  172. -------------------
  173.     You may compile code and then save the resultant dictionary image for later reloading.
  174. To save, type SAVE-FORTH, which brings up a requester for a "save file as" name. BUG: The requester
  175. doesn't always come to front, you may have to go look for it behind your window! Choose a filename
  176. and click "OK" and your dictionary will be saved for a later reload without recompilation.
  177.  
  178.     LIMITATION: Don't SAVE-FORTH with any wordlists in the search order or current compilation
  179. wordlist EXCEPT those from among the predefined system wordlists: FORTH-WORDLIST INTERNALS-WORDLIST
  180. SYSTEM-WORDLIST and NONSTANDARD-WORDLIST. Instead, your program should set the search order 
  181. ynamically at runtime.
  182.  
  183. See: SAVE-FORTH RELOAD RELOAD-FILE RELOADED
  184.  
  185. Recompilation of Jax4th
  186. -----------------------
  187.     To compile Jax4th from the sources provided you will need:
  188.  
  189.         - Microsoft MASM 6.11 or later (thanx for the beta, Microsoft!)
  190.  
  191.     For compiling Jax4th for Windows NT:
  192.  
  193.         - The Windows NT SDK and a 32 bit linker, such as LINK32 from the beta NT SDK.
  194.  
  195.     A Makefile for NMAKE is provided.
  196.         
  197. Standard System
  198. ---------------
  199.     Jax4th is a model system conforming to the current state of the draft proposed Standard Forth
  200. (ANSI/IEEE X3.215-199x) to the best of the author's understanding.
  201.  
  202.     The following dpANS word sets are provided in their entirety:
  203.  
  204.         Core
  205.         Block
  206.         Exception-Handling
  207.         Memory-Allocation (*note: Memory-Allocation wordset provided in loadable source form.)
  208.         Search-Order
  209.  
  210.     The following wordsets are substantially provided in Jax4th with some non-conformance noted later in this
  211. document:
  212.  
  213.         File-Access
  214.         String
  215.  
  216.     Selected words from the following wordsets are present in Jax4th:
  217.  
  218.         Core Extensions
  219.         Double-Number (and Extensions)
  220.         Facility
  221.         Programming-Tools
  222.  
  223.     The following word sets are not supported at all in the current revision of Jax4th. Some may be supported or
  224. partially supported in future revisions:
  225.  
  226.         Floating-Point
  227.         Locals
  228.  
  229. See the Glossary later in this document for more information.
  230.  
  231. General Implementation Options
  232. ----------------------
  233.     Aligned address requirements:
  234.         ALIGN aligns the dataspace to longword (4 bytes) boundaries. In general, the system is thus aligned,
  235.     though as regards the dictionary (as opposed to data space) this should be transparent to the user. See,
  236.     however, "Character-aligned address requirements" below.
  237.  
  238.     Behavior of EMIT for non-displayable values:
  239.         The Unicode support for the Windows NT Console tends to display question marks ("?") for non-printable
  240.     values.
  241.  
  242.     Character-aligned address requirements:
  243.         Jax4th characters are Unicode, and must be word (2 byte) aligned. See also: ASCIIZ and UNICODE in the
  244.     "Glossary" later in this document. Also, see "File Handling, ASCII and Unicode" later in this document.
  245.  
  246.     Character editing of ACCEPT:
  247.         The line-editing performed by Jax4th ACCEPT is provided by the Windows NT Console. DOSKEY-based
  248.     command-line edits and recall via the arrow keys is supported.
  249.  
  250.     Control-flow stack:
  251.         The data stack is the control-flow stack. No type checking on control structure information is
  252.     performed.
  253.  
  254.     User output device:
  255.         The user output device is the Windows NT Console.
  256.  
  257.     Display after return of ACCEPT:
  258.         The NT Console emits a CR/LF pair when the user terminates ACCEPT.
  259.  
  260.     Exception abort sequence:
  261.         ABORT and ABORT" are implemented in terms of CATCH/THROW. At powerup, an initial CATCH frame is pushed
  262.     on the exception stack which catches stray THROWs that are not caught by application code. When such THROWs are
  263.     caught, the exception stack is re-initialized as before.
  264.  
  265.         The exception stack is implemented on the return stack.
  266.  
  267.         Certain THROWs are recognized and the default handler for the system CATCH frame prints a message
  268.     associated with them. If a THROW hits the system CATCH frame and the THROW number is not recognized, a message
  269.     indicating the THROW number and the address at which it occurred is printed.
  270.  
  271.         In the case of ABORT, no message is printed, but the following actions occur:
  272.  
  273.             - The initial CATCH frame is restored.
  274.             - The return stack is cleared.
  275.             - The data stack is cleared.
  276.             - The input stream is restored to the default console input and emptied.
  277.             - The STATE of the system is restored to "interpreting".
  278.  
  279.         Additionally, in the case of ABORT" the user-supplied message string is displayed.
  280.  
  281.     Input return key:
  282.         The input return key is the Enter key.
  283.  
  284.     Maximum size of counted string:
  285.         65,535 characters.
  286.  
  287.     Maximum size of a word name:
  288.         126 characters.
  289.  
  290.     Maximum string length for ENVIRONMENT?:
  291.         65,535 characters.
  292.  
  293.     Method of selection of user input device:
  294.         There is a deficiency in Windows NT Console support for Unicode. WriteFile() doesn't support Unicode
  295.     to console handles. WriteConsole() doesn't support redirection of console I/O. The result is either Unicode
  296.     or no command line redirection of I/O for Jax4th. The author chose Unicode; therefore, there is no redirection
  297.     of console I/O for Jax4th.
  298.  
  299.     Method of use of return stack during compilation:
  300.         The return stack is not used in any special manner during compilation.
  301.  
  302.     Methods of dictionary compilation:
  303.         The data stack is the control flow stack.
  304.  
  305.         A name is not linked into the compilation wordlist until the name's definition is complete. A colon
  306.     definition will not be completed if the data stack depth has changed since the definition was commenced.
  307.  
  308.         There is no type checking performed on control flow construct information.
  309.  
  310.         There is no warning for name redefinition.
  311.  
  312.         Compilation occurs in the user dictionary, which is in a separate address space from the kernel
  313.     dictionary. Any execution token returned by ' ("tick") may be converted to a data-relative address via
  314.     the word TOKENTODATA.
  315.  
  316.     Methods of memory space management:
  317.         Data space is separate from dictionary space and commences at a relative address of zero. A data
  318.     space address must be converted to an absolute address via DATATOABS (q.v., Glossary) before passing such
  319.     to a Windows NT system call.
  320.  
  321.         Any Windows NT memory allocation operation will return an absolute addres which must be converted to a
  322.     data-relative address before operating upon it with ! or @ etc. via ABSTODATA.
  323.  
  324.         See also: ABSTOCODE CODETOABS CODETODATA DATATOCODE TOKENTODATA in the Glossary.
  325.  
  326.     Minimum search order:
  327.         There are four (4) wordlists in the Jax4th kernel:
  328.  
  329.             FORTH-WORDLIST        all the standard Forth words in the Jax4th system.
  330.             NONSTANDARD-WORDLIST    some familiar, some new, but all nonstandard Forth words.
  331.             SYSTEM-WORDLIST        special words the user needs to interface Jax4th to the host OS.
  332.             INTERNALS-WORDLIST    low-level words used internally, most not of direct use to the programmer.
  333.  
  334.     (toti q.v., Glossary). The minimum search order is FORTH-WORDLIST, but the bootup default is FORTH-WORDLIST
  335.     NONSTANDARD-WORDLIST SYSTEM-WORDLIST in that order. INTERNALS-WORDLIST is interesting, but not generally
  336.     useful to the programmer, so it is not placed in the search order by default.
  337.  
  338.     Number of bits in one address unit:
  339.         A Jax4th address unit is a byte, eight (8) bits.
  340.  
  341.     Number representation:
  342.         Two's complement.
  343.  
  344.     Ranges for:
  345.         Type        Low        High
  346.         ----        ---        ----
  347.         n        -2^31        (2^31)-1
  348.         +n        0        (2^31)-1
  349.         u        0        (2^32)-1
  350.         d        -2^63        (2^63)-1
  351.         +d        0        (2^63)-1
  352.         ud        0        (2^64)-1
  353.  
  354.     Read-only data space regions:
  355.         The kernel, the user dictionary, and runtime data space loaded by Jax4th may be read. Aside from this
  356.     space, only readable allocations made by the user via the Jax4th facility to perform Windows NT system calls
  357.     may be read. All other memory is not readable, albeit addressable.
  358.  
  359.     Size of one cell in address units:
  360.         4 address units.
  361.  
  362.     Size of one character in address units:
  363.         2 address units.
  364.  
  365.     Size of keyboard terminal input buffer:
  366.         256 characters.
  367.  
  368.     Size of the pictured numeric output string buffer:
  369.         128 characters.
  370.  
  371.     Size of PAD:
  372.         128 characters.
  373.  
  374.     System prompt:
  375.         The characters
  376.  
  377.             ok
  378.  
  379.         followed by the depth of the data stack represented in the current numeric base form the system prompt.
  380.  
  381.     Type of division:
  382.         The default division algorithm is "symmetrical about zero".
  383.  
  384.     Values returned after arithmetic overflow:
  385.         Undefined.
  386.  
  387.     The current definition may not be found immediately after DOES> until the semicolon (";") which matches the
  388.     colon (":") which commenced the current definition is encountered by the text interpreter.
  389.  
  390. Wordset-specific Implementation Options
  391. ---------------------------------------
  392. BLOCK:
  393.  
  394.     Format of LIST:
  395.         Traditional 16 x 64 screen display with header and line numbers on each side.
  396.         Also, file id is displayed at top of screen.
  397.  
  398.     Length of line affected by \:
  399.         To end of 64-character line.
  400.  
  401. DOUBLE:
  402.  
  403.     None.
  404.  
  405. EXCEPTION:
  406.  
  407.     List of Throw Codes:
  408.         Many Jax4th words will THROW a throw code on encountering an error. That THROW will be
  409.     trapped by a system CATCH unless caught by a user CATCH. The system CATCH either prints
  410.     a specific message, or returns the number of the THROW. Jax4th does not necessarily
  411.     trap all error conditions specified below.
  412.  
  413. -1 ABORT
  414. -2 ABORT"
  415. -3 stack over
  416. -4 stack under
  417. -5 ret stack over
  418. -6 ret stack under
  419. -7 too many DO .. LOOPs
  420. -8 dictionary space exhausted
  421. -9 invalid memory address
  422. -10 divide by zero
  423. -11 result overflow/underflow
  424. -12 wrong arg type
  425. -13 word not found
  426. -14 compile-only
  427. -15 bogus FORGET
  428. -16 empty string used for name
  429. -17 numeric output string too long
  430. -18 parsed string too long
  431. -19 name too long
  432. -20 illegal memory write
  433. -21 unsupported operation
  434. -22 control struct mismatch
  435. -23 misaligned address
  436. -24 invalid numeric argument
  437. -25 return stack imbalance
  438. -26 loop parameters inaccessible
  439. -27 bogus recursion
  440. -28 user interrupt
  441. -29 attempt to nest definitions
  442. -30 obsolescent feature
  443. -31 >BODY used on non-CREATEd word
  444. -32 invalid name argument
  445. -33 block read exception
  446. -34 block write exception
  447. -35 invalid block number
  448. -36 invalid file position
  449. -37 file i/o exception
  450. -38 non-existent file
  451. -39 unexpected end-of-file
  452. -40 invalid BASE for floating point conversion
  453. -41 loss of precision
  454. -42 floating-point div by zero
  455. -43 floating-point result out of range
  456. -44 floating-point stack over
  457. -45 floating-point stack under
  458. -46 floating-point invalid argument
  459. -47 compilation word list deleted
  460. -48 invalid POSTPONE
  461. -49 search-order overflow
  462. -50 search-order underflow
  463. -51 compilation word list changed during compilation
  464. -52 control-flow stack over
  465. -53 exception stack over
  466. -54 floating-point numeric underflow
  467. -55 floating-point unidentified fault
  468. -56 QUIT
  469. -57 character send/receive exception
  470. -58 [IF] [ELSE] or [THEN] exception
  471.  
  472. FACILITY:
  473.  
  474.     Encoding of keyboard events re: EKEY:
  475.         EKEY not currently implemented.
  476.  
  477.     Duration of system clock tick:
  478.         MS not currently implemented.
  479.     
  480.     Repeatability to be expected from MS:
  481.         MS not currently implemented.
  482.  
  483. FILE:
  484.     <this documentation not finished>
  485.  
  486.     File line terminator:
  487.         <CR><LF> or just <LF>.
  488.  
  489.     Maximum size of an input line:
  490.         256 characters.
  491.  
  492.     Size of string buffer used by S":
  493.         256 characters.
  494.  
  495. General Ambiguous Conditions
  496. ----------------------------
  497.     If the data stack underflows and the interpreter is entered, the condition will be detected and
  498. the appropriate THROW (-4, data stack underflow) will be made. Data stack overflow, return stack underflow and
  499. return stack overflow at present go undetected in Jax4th.
  500.  
  501.     Insufficient space for loop-control parameters at present goes undetected in Jax4th.
  502.  
  503.     Insufficient space in the dictionary at present goes undetected in Jax4th.
  504.  
  505.     If a program addresses a region which is not readable data space, the Windows NT Executive Virtual Memory
  506. Manager will cause an exception which at present will be handled by the Win32 subsystem. Future Jax4th revisions may
  507. handle this exception.
  508.  
  509.     If a program causes a machine division by zero, the Windows NT Kernel will cause an exception which at present
  510. will be handled by the Win32 subsystem. Future Jax4th revisions may handle this exception.
  511.  
  512.     A mathematical result out-of-range will be returned silently. Any mathematical shift with an invalid shift-count
  513. argument returns an undefined result.
  514.  
  515.     An incompatible argument type is rarely recognized by Jax4th, with the exception of passing an execution token
  516. not created by CREATE to >BODY, which will cause the appropriate THROW (-31, >BODY used on non-CREATE word).
  517.  
  518.     An invalid lexical item (neither a name nor a number in the current base) will cause the interpreter/compiler
  519. to perform the appropriate THROW (-13, undefined word).
  520.  
  521.     Interpretation of a word with undefined interpretation semantics results in an appropriate THROW (-14,
  522. interpretive execution of a compile-only construct). If a POSTPONEd construct is executed at interpret time, the
  523. same THROW -14 occurs.
  524.  
  525.     Attempting to find an execution token for a defintion with undefined interpretation semantics succeeds.
  526.  
  527.     An attempt to use a zero-length string as a name due to input stream exhaustion results in the appropriate
  528. THROW (-16, attempt to use zero-length string as a name).
  529.  
  530.     Overflow of pictured numeric output string, though unlikely, occurs silently and may compromise Jax4th
  531. execution.
  532.  
  533.     Parsed string overflow, though unlikely, occurs silently and may compromise Jax4th execution.
  534.  
  535.     A word name exceeding the maximum length of a word name results in an undefined condition. No harm to Jax4th
  536. execution will occur, but the name may not be findable in a recognizable form, or if findable, may have unexpected
  537. attributes, such as unasked-for immediacy.
  538.  
  539.     Program modification of the contents of the input stream or of a string literal are harmless, except,
  540. possibly, to the meaning of the program.
  541.  
  542.     Other ambiguous conditions are documented in the Glossary under the heading for the word to which they pertain.
  543.  
  544. Wordset-specific Ambiguous Conditions
  545. -------------------------------------
  546. BLOCK:
  547.  
  548.     Correct BLOCK read impossible:
  549.         Appropriate THROW is made depending on cause of error.
  550.  
  551.     I/O exception in BLOCK transfer:
  552.         Appropriate THROW is made depending on cause of error.
  553.  
  554.     Invalid BLOCK number:
  555.         Appropriate THROW is made depending on cause of error.
  556.  
  557.     A program directly alters contents of BLK:
  558.         Undefined; better not do it!
  559.  
  560.     No current block buffer for UPDATE:
  561.         Undefined.
  562.  
  563. DOUBLE:
  564.  
  565.     d outside range of n in D>S:
  566.         Silent truncation.
  567.  
  568. EXCEPTION:
  569.  
  570.     None.
  571.  
  572. FACILITY:
  573.  
  574.     AT-XY operation can't be performed on user output device:
  575.         Undefined.
  576.  
  577. FILE:
  578.  
  579.     Attempt to position a file outside its boundaries:
  580.         Should be an appropriate ior or THROW, but
  581.         NT appears to accept such an operation.
  582.  
  583.     Attempting to read from file position not yet written:
  584.         Undefined.
  585.  
  586.     fileid is invalid:
  587.         Appropriate ior or THROW.
  588.  
  589.     I/O exception reading or closing fileid:
  590.         Appropriate ior or THROW.
  591.  
  592.     Named file cannot be opened:
  593.         Appropriate ior or THROW.
  594.  
  595.     Requesting an unmapped BLOCK number.
  596.         Appropriate ior or THROW.
  597.  
  598.     Using SOURCE-ID when BLK is not zero:
  599.         Undefined.
  600.  
  601. Other General System Documentation
  602. ----------------------------------
  603.     System dictionary space:
  604.         Currently, 65,536 address units.
  605.  
  606.     Available application data space:
  607.         Currently, 65,536 address units minus the value returned by HERE at powerup.
  608.  
  609.     Data stack space:
  610.         Currently, 4096 cells.
  611.  
  612.     Return stack space:
  613.         Currently, 4096 cells.
  614.  
  615.     Operator's terminal facilities:
  616.         By default, the Windows NT Console, but there's a whole world of GUI waiting out there!
  617.  
  618. Other Wordset-Specific System Documentation
  619. -------------------------------------------
  620. BLOCK:
  621.  
  622.     Restrictions which multiprogramming places on use of buffer addresses:
  623.         Jax4th does not support multiprogramming.
  624.  
  625.     Number of BLOCKs available for source text and data:
  626.         Limited by file size.
  627.  
  628. DOUBLE:
  629.  
  630.     None.
  631.  
  632. EXCEPTION:
  633.  
  634.     None.
  635.  
  636. FACILITY:
  637.  
  638.     None.
  639.  
  640. FILE:
  641.  
  642.     None.
  643.  
  644.  
  645. Non-Conformance
  646. ---------------
  647.     In the areas discussed below, Jax4th is either non-conforming to the intent of the draft proposed Standard
  648. Forth or of questionable conformity.
  649.  
  650.     Facility:
  651.  
  652.         We ought to make KEY? conform a little more closely to what KEY returns below
  653.     1Bh. Also, KEY? should be discarding non-char-set events it encounters up until the first,
  654.     then should discard no more until KEY is called. We are non-conforming here in that we
  655.     don't discard, but KEY *does* discard the non-char-set key events. However, after calling
  656.     KEY? successfully, EKEY could conceivabley find a non-char-set key event preceding the char
  657.     which triggered the KEY? flag, which doesn't seem to be what the Standard intends 10.6.1.1755.
  658.  
  659.  
  660.     File Word Set:
  661.         ( "paren" is non-compliant in that it does not span multiple lines of source
  662.         seeking its matching right-paren.
  663.  
  664.     String Word Set:
  665.         Of the entire String word set, only SEARCH is not present in the current revision of Jax4th.
  666.  
  667.  
  668. File-Handling, ASCII and Unicode
  669. --------------------------------
  670.     Realize that READ-FILE WRITE-FILE FILE-POSITION REPOSITION-FILE, etc. are supposed in ANS Forth
  671. to deal with "characters". To deal with this, we created parallel defs, e.g., READ-FILEA (ascii) READ-FILEW
  672. (wide-char unicode) and a DEFERred READ-FILE which is vectored by default at powerup (in COLD) to READ-FILEW.
  673.  
  674.     If you want to change the vector for READ-FILEA to read ASCII files, then
  675.  
  676.         ' READ-FILEA ' READ-FILE >BDDY !
  677.  
  678. is sufficient.
  679.  
  680.     Affected words, all of which are now deferred words, vectored by default at powerup to their Unicode
  681. versions (e.g., FILE-POSITION executes FILE-POSITIONW instead of FILE-POSITIONA):
  682.  
  683.         FILE-POSITION
  684.         FILE-SIZE
  685.         READ-FILE
  686.         REPOSITION-FILE
  687.         RESIZE-FILE
  688.         WRITE-FILE
  689.  
  690.     The word READ-LINE is currently Unicode only.
  691.  
  692.     NOTE!!! that BLOCK always reads characters, not bytes. The ANSI definition of a BLOCK is 1024
  693. characters, so BLOCK calls READ-FILEW WRITE-FILEW etc. directly. BLOCK is *not* affected by any revectoring
  694. you do.
  695.  
  696.     See below: "BLOCK File Loading in Jax4th" and "Unicode Text File Loading in Jax4th".
  697.  
  698.     NOTE!!! The S" in Jax4th appends a null character 0x0000 to the end of the string
  699. which it parses. If you need a null-terminated string for a system call, just DROP the count
  700. from such a string.
  701.  
  702. Selected Low-Level Details about Jax4th
  703. ---------------------------------------
  704.     The method of compilation of kernel addresses may not work forever. Currently in NT, on loading code it loads at
  705. the same address each time, but that may not last. In any event, the user will have to recompile saved dictionaries
  706. each new release of Jax4th and probably each new release of NT. Alternatively, we could do runtime relocation of
  707. dictionary. Of course, if we went that far, why not go for a subroutine-threaded design?
  708.  
  709.     The Console handles are exposed in Jax4th so you can go wild and play with the Console capabilities
  710. of NT from within Jax4th if you are up to programming it. The VARIABLEs StdIn StdOut and StdErr contain the
  711. handles you need. Also see ConsoleMode GetConsoleMode and SetConsoleMode (in the source code if I haven't
  712. managed to get info into the Glossary by the time you read this.
  713.  
  714.     Structs are weird between MASM and Windows NT. For instance, the INPUT_RECORD structure defines
  715. the InputRecord.EventType as WORD but you have to say DWORD in MASM in this instance (WINDOWS.I) and then
  716. in referencing the data use WORD to avoid getting garbage (see the source KEY? in JAX4TH.A). The alignment
  717. factor as treated by MASM isn't always automatically the same as the alignment factor in the C includes.
  718.  
  719. Stylistic
  720. ---------
  721.     As simple and good-old as this Forth can be made. Indirect threaded. Going beyond the CORE, it's not exactly the
  722. minimal implementation, but pretty much just that I felt made a compact yet complete system. Forth programmers don't need
  723. floating point or local variables, but they *do* like DUMP.
  724.  
  725. Loading Source Code in Jax4th
  726. -----------------------------
  727.     The draft proposed Standard for Forth mandates that if any file-loading capabilities are present in a Standard
  728. System, the classic Forth mass storage mechanism BLOCK must be present. Loading prepared program source into Jax4th is
  729. done via this BLOCK mechanism or via loading from a text file. Both BLOCK files and text files for Jax4th must be
  730. Unicode, not ASCII. See below about converting and loading BLOCK and text files.
  731.  
  732. Converting ASCII BLOCK and Text Files to Unicode BLOCK and Text Files
  733. ---------------------------------------------------------------------
  734.     While classic Forth BLOCKs consist of 1024 bytes, ANS Forth says that a BLOCK consists of 1024 characters. A
  735. character in Jax4th is 16 bits wide (Unicode), so a BLOCK file edited under a typical Forth BLOCK editor won't load in
  736. Jax4th without massaging. Since Jax4th doesn't have a very good BLOCK editor yet, this could be a drawback. However, we
  737. have provided file massaging utilities coded in C to allow you to use a BLOCK editor from another Forth system to do
  738. development.
  739.  
  740.     UNIBLOCK.EXE [sourcefile destfile ]|[/?] converts an ASCII file sourcefile to a Unicode file destfile. Type
  741. UNIBLOCK /? for help.
  742.  
  743.     UNIASCII.EXE [sourcefile destfile ]|[/?] converts a Unicode file sourcefile to an ASCII file destfile. Type
  744. UNIASCII /? for help.
  745.  
  746.     Both these utilities work on text files as well as BLOCK files.
  747.  
  748.     Note: The BLOCK (*.BLK) and text files (*.UTF) distributed with Jax4th are already converted! The only
  749. non-Unicode source file included is EXAMPLES\SHORTEST.F which is used to demonstrate DDE pasting of ASCII source
  750. into Unicode Jax4th. Don't convert SHORTEST.F!
  751.  
  752. BLOCK File Loading in Jax4th
  753. ----------------------------
  754.     To open a BLOCK file, use OPEN-FILE:
  755.  
  756.         S" EXAMPLE\JX4EXAMP.BLK" R/W OPEN-FILE
  757.  
  758.     If the return from OPEN-FILE is zero (0), the operation was successful and the file handle is on the data
  759. stack. Store that file handle in the system variable BLOCK-FILE:
  760.  
  761.         BLOCK-FILE !
  762.  
  763.     After that you may use LIST and LOAD and they will perform as they always have in Forth.
  764.  
  765. Unicode Text File Loading in Jax4th
  766. ------------------------------------
  767.     Jax4th interprets text files. However, they have to be UNICODE text files.
  768. UNIPAD in the Windows NT %MSTOOLS%\BIN     directory is brain-dead and buggy. One way to deal
  769. with Unicode is to use UNIBLOCK.EXE to convert the text files you are editing to Unicode files.
  770. (It's *called* UNIBLOCK but it doesn't really care if it's a BLOCK file or a plain text file.
  771. I am using the .UTF extension for Unicode text files since that's what Unipad wants to do.
  772.  
  773.     To interpret a text file, pass a valid file id to INCLUDE-FILE.
  774.  
  775.         S" UTILS\UB2T.UTF" R/O OPEN-FILE .
  776.         0 ok1
  777.         VARIABLE MyFile !
  778.         ok0
  779.         MyFile @ INCLUDE-FILE
  780.         ok    \ Text will have been interpreted before this prompt appears.
  781.  
  782.     Alternatively, used INCLUDED, e.g.,
  783.  
  784.         S" UTILS\UB2T.UTF" INCLUDED
  785.         ok    \ Text will have been interpreted before this prompt appears.
  786.  
  787.     Of course, you could just define INCLUDE as follows:
  788.  
  789.         : INCLUDE BL WORD COUNT INCLUDED ;
  790.         ok INCLUDE UTILS\UB2T.UT
  791.         ok    \ Text will have been interpreted before this prompt appears.
  792.  
  793. which is probably the best way to go.
  794.  
  795.     NOTE: Jax4th doesn't handle embedded tabs or other control chars (except CR & LF)
  796. yet. Make sure your text editor is doing "soft tabs". i.e., inserting four or more spaces
  797. for tabs instead of hex 09 characters.
  798.  
  799.     NOTE: Paren "(" is non-compliant with the Standard in that it doesn't span multiple
  800. lines of text file interpretation while awaiting its matching right-paren ")". (I voted
  801. against that stupid idea on X3J14, by the way). Will fix this Real Soon Now.
  802.  
  803. Making Windows NT System Calls from Jax4th
  804. -------------------------------------------
  805.     There are several words of interest to one desiring to write Windows NT system calls in Jax4th. Their
  806. explanations should be examined in the Glossary of this document:
  807.  
  808.     ASCIIZ
  809.     DATATOABS
  810.     GetProcAddress
  811.     FreeLibrary
  812.     LoadLibraryEx
  813.     SYSCALL
  814.  
  815.     The procedure is as follows:
  816.  
  817.     1) Load the library using LoadLibraryEx and save the handle in a variable. Make sure you got a valid handle
  818. back, and not a NULL.
  819.     2) Use GetProcAddress to get the addresses of any calls you wish to make.
  820.     3) Push parameters on stack right-to-left from their formal parameters as documented in the Windows NT SDK,
  821. taking care to convert Forth data-relative addresses to absolute addresses via DATATOABS.
  822.     4) Push address obtained from GetProcAddress on stack and execute SYSCALL. The returns in EDX and EAX will be
  823. found on the stack afterwards.
  824.     5) Use FreeLibrary to free the library reference made by the earlier LoadLibraryEx.
  825.  
  826.     Note the funny aspect of NT that LoadLibraryEx takes Unicode strings for library names, but GetProcAddress
  827. only accepts ASCIIZ strings. Therefore, we have provided ASCIIZ to return the address of a null-terminated byte string
  828. for this sort of system call.
  829.  
  830.     Here is an example of using the system call Beep(dwFreq,dwDuration)
  831.  
  832.     VARIABLE KERNEL32 
  833.     0 0 S" KERNEL32.DLL" DROP DATATOABS LoadLibraryEx
  834.     KERNEL32 !
  835.     VARIABLE SYSBEEP
  836.     S" Beep" ASCIIZ DATATOABS KERNEL32 @ GetProcAddress
  837.     SYSBEEP !
  838.     1000 ( duration) 440 ( frequency) SYSBEEP @ SYSCALL ( Beeps A:440 for 1 second.)
  839.  
  840.     The above example will leave two (2) items on the stack: the contents of the registers EDX and EAX. Windows NT
  841. DLLs return singles in EAX and doubles in EDX:EAX. I probably should change the order in which these are returned on
  842. the stack ... currently EAX, which is more often useful, is on top.
  843.  
  844.     Note that you do not have to re-open the library and re-resolve the procedure address every time you make the
  845. call, but you must do so each time you load your Forth image, since these addresses and handles are not fixed.
  846.  
  847.     Before you exit, you should close the libraries you opened.
  848.  
  849.     KERNEL32 @ FreeLibrary
  850.  
  851.     ... will do the trick in the above example.
  852.  
  853.     NOTE: An example of writing a nice front end to Windows NT System Calls is found in UTILS\SYSCALLS.UTF.
  854.  
  855. Example Source Code
  856. -------------------
  857.     There are three directories of Forth source code, \EXAMPLE \UTILS and \OBJ4TH.
  858.  
  859.     \EXAMPLE contains a Unicode BLOCK file called PASTE.BLK prepared by Clifford L. King
  860. of Micro K Systems, Aurora, Colorado, along with an ASCII test file SHORTEST.F. PASTE.BLK
  861. demonstrates DDE in Jax4th.
  862.  
  863.     \UTILS contains Unicode text files:
  864.  
  865.     UTILS\UTILS.UTF        Unicode text source for various utilities.
  866.     UTILS\EDITOR.UTF    Unicode text source for a simple Unicode BLOCK
  867.                 file editor.
  868.     UTILS\MEMORY.UTF    Unicode text source for the Memory Allocation
  869.                 word set.
  870.     UTILS\SYSCALLS.UTF    Unicode text source examples of Jax4th system
  871.                 calls to NT DLLs.
  872.     UTILS\UB2T.UTF        Unicode text source for program to convert
  873.                 Unicode BLOCK files to Unicode text files.
  874.     UTILS\YIQING.UTF    Cast the Yi Qing oracle.
  875.  
  876.     \OBJ4TH contains files imlementing some object extensions stuff.
  877.  
  878.     OBJ4TH\DIMARRAY.UTF    DIMARRAY, a CREATEing word which creates n-dimensioned
  879.                 self-indexing arrays.
  880.  
  881.     OBJ4TH\MULTIOOP.UTF    Multiple-inheritance data objects. The syntax in accessing
  882.                 such objects, once defined with methods, is
  883.  
  884.                     n1 .. nm method object
  885.  
  886.     OBJ4TH\OOPSOBJS.UTF    Sample object defined under MULTIOOP. For example, to create
  887.                 an array of characters after loading this file you might type:
  888.  
  889.                     10 CHAR-ARRAY FOO
  890.  
  891.                 then store to the first, second and third elemes of it:
  892.  
  893.                     CHAR Z 0 `TO' FOO CHAR E 1 `TO' FOO CHAR D 3 `TO' FOO
  894.  
  895.                 and then checksum them all with:
  896.  
  897.                     `CHECKSUM' FOO
  898.  
  899.     NOTE!!! that the files are somewhat mutually dependent, but have a rudimentary conditional
  900. include facility (awaiting my implementation of [IF] [ELSE] and [THEN]). They expect that Jax4th
  901. has been launched in the top-level Jax4th directory with the other descendant directorys present,
  902. so if you didn't unzip preserving directory structures, e.g., PKUNZIP -D , then you had better do
  903. that now.
  904.  
  905. To Do
  906. -----
  907.     KEY KEY? EKEY EKEY? are working but I think I have to make KEY? conform a little more
  908.     closely to what KEY returns. Also, KEY? should be discarding non-char-set events it
  909.     encounters up until the first, then should discard no more until KEY is called. We
  910.     are non-conforming here.
  911.  
  912.     Finish cleaning up struct declarations in WINDOWS.I.
  913.  
  914.     Change WORDLISTS so they return tokens instead of addresses so that user can save
  915.     images which have non-system wordlists in the search order at SAVE-FORTH time.
  916.  
  917. Glossary of Jax4th
  918. ------------------
  919. !!!***!!! This Glossary is not finished, but it does contain all the words in Jax4th.
  920.  
  921.     Here is a sorted list of all words in Jax4th, with their stack arguments, the wordlist in which they are found,
  922. and a brief definition.  The dpANS-Forth word set (if any) from which the word is taken is indicated. The definitions
  923. contained herein are NOT OFFICIAL DEFINITIONS. For more information, see the Standard itself [ANSI/IEEE X3.215-199x].
  924.  
  925.     THIS GLOSSARY IS NOT A FORTH TUTORIAL! The entry for >R notes that the top data stack item moves to the
  926. return stack, but doesn't tell you what every Forther knows, that that same item had better be moved off before
  927. the next semi-colon is hit.
  928.  
  929.  
  930.     Key to stack abbreviations:
  931.     ---------------------------
  932.     x        any single-cell stack item
  933.     xd        any double-cell stack item
  934.     n        any signed single-cell integer
  935.     +,-n        any positive,negative single-cell integer
  936.     d        any signed double-cell integer
  937.     +,-d        any positive,negative double-cell integer
  938.     u        any unsigned single-cell integer
  939.     ud        any unsigned double-cell integer
  940.     c        a character
  941.     "ccc"        a string of characters in the input stream
  942.     "ccc<a>"    a string of characters in the input stream terminated by a character <a>
  943.     name        a Forth word's name in the input stream
  944.     addr        an address in Forth data space
  945.     a-addr        a cell-aligned address in Forth data space
  946.     c-addr        a character-aligned address in Forth data space
  947.     xt        an execution token
  948.     R:        happening on the return stack
  949.     C:        happening on the control flow stack
  950.     
  951.  
  952. Notes:
  953.  
  954.     - An "aligned address" is one that falls on a boundary fitting the host architecture.
  955.     In the case of Jax4th for Windows NT, that's on a word (16-bit) boundary, an even address.
  956.  
  957.     - The gloss "iff" is to be read as in logic, "if-and-only-if".
  958.  
  959. The Words
  960. ---------
  961. !        ; x a-addr --            FORTH-WORDLIST        CORE
  962.     Store cell x at a-addr.
  963.  
  964. #        ; ud1 -- ud2            FORTH-WORDLIST        CORE
  965.     ud2 is ud1's double integer quotient by BASE @. The modulus of character width is deposited
  966. at the current index into the pictured numeric output string buffer.
  967.  
  968. #>        ; ud -- c-addr u        FORTH-WORDLIST        CORE
  969.     ud is discarded and the address and count of the pictured numeric output string stored in the
  970. transient pictured numeric output string buffer is returned.
  971.  
  972. #S        ; ud1 -- ud2            FORTH-WORDLIST        CORE
  973.     perform successive # operations on ud1 until ud2 is zero (0).
  974.  
  975. #TIB        ; -- c-addr            FORTH-WORDLIST        CORE EXT
  976.     variable holding number of chars ACCEPTed into TIB the last time TIB got filled.
  977.  
  978. '        ; -- xt | abort            FORTH-WORDLIST        CORE
  979.     consume a word from the input stream and find it in one of the wordlists in the search order.
  980. Return the word's execution token, or THROW a -13 if the word is not found.
  981.  
  982. 'TIB        ; -- a-addr            NONSTANDARD-WORDLIST    ---
  983.     address of the TIB. Standard programs don't modify the data at that address.
  984.  
  985. (ACCEPT)    ; c-addr +n1 -- +n2        INTERNALS-WORDLIST    ---
  986.     interal to ACCEPT.
  987.  
  988. (PARSE)     ; char "ccc<char>" -- c-addr u    INTERNALS-WORDLIST    ---
  989.     interal to PARSE.
  990.  
  991. (        ; "ccc<)>" --            FORTH-WORDLIST        CORE
  992.     Parse up to the next ) and discard. If no ) is found to the end of the input stream,
  993. discard entire remainder of input stream.
  994.  
  995. *        ; n|u1 n|u2 -- n|u3        FORTH-WORDLIST        CORE
  996.     Multiply n|u1 by n|u2 returning n|u3.
  997.  
  998. */        ; n1 n2 n3 -- n4        FORTH-WORDLIST        CORE
  999.     Multiply n1 by n2 and divide the intermediate double product by n3 yielding quotient n4.
  1000. Follows default signed division algorithm.
  1001.  
  1002. */MOD        ; n1 n2 n3 -- n4 n5        FORTH-WORDLIST        CORE
  1003.     As */ but returning remainder n4 and quotient n5. Follows default signed division algorithm.
  1004.  
  1005. +        ; n|u1 n|u2 -- n|u3        FORTH-WORDLIST        CORE
  1006.     Addition.
  1007. +!        ; x a-addr --            FORTH-WORDLIST        CORE
  1008.     Increment the datum stored a x-addr by the value of x. In the case of overflow/underflow
  1009. of the incremented value, Jax4th silently two's-complement wraps.
  1010.  
  1011. +LOOP        ; u --                FORTH-WORDLIST        CORE
  1012.     Loop back to the syntactically enclosing DO, having added x to the loop index.
  1013.  
  1014. ,        ; x --                FORTH-WORDLIST        CORE
  1015.     Store the cell value x to the next available cell in data space and advance the allotment
  1016. pointer whose value is returned by HERE by value of one cell.
  1017.  
  1018. -        ; n|u1 n|u2 -- n|u3        FORTH-WORDLIST        CORE
  1019.     Subtraction.
  1020.  
  1021. -ROT        ; x1 x2 x3 -- x3 x1 x2        NONSTANDARD-WORDLIST    ---
  1022.     Rotate the top data element to third-on-stack.
  1023.  
  1024. -TRAILING    ; c-addr1 u1 -- c-addr1 u2    FORTH-WORDLIST        CORE
  1025.     Shorten the string count u1 by subtracting the count of trailing blanks to yield u2.
  1026.  
  1027. .        ; n --                FORTH-WORDLIST        CORE
  1028.     Print to the current output device the signed single n in the current number base.
  1029.  
  1030. ."        ; Interp -- c-addr u Compile --    FORTH-WORDLIST        CORE
  1031.     When encountered, compile the following characters in the input stream until the
  1032. end of the input stream or until a " is encountered into the dictionary with the runtime
  1033. routine to print the string thus compiled to the current output device.
  1034.  
  1035. ..        ; i*x --            NONSTANDARD-WORDLIST    ---
  1036.     Print the entire data stack destructively.
  1037.  
  1038. .NAME        ; c-addr --            NONSTANDARD-WORDLIST    ---
  1039.     Print out a name header. ' DUP TOKENTODATA EXETONAME .NAME will print DUP.
  1040.  
  1041. .S        ; i*x -- i*x            FORTH-WORDLIST        TOOLS
  1042.     Print the entire data stack non-destructively.
  1043.  
  1044. .WID        ; wid --            NONSTANDARD-WORDLIST    ---
  1045.     Print the name and wid of the wordlist represented by WID.
  1046.  
  1047. .WORD        ; link-token --            INTERNALS-WORDLIST    ---
  1048.     Print out the name of a word whose link token is on the stack.
  1049.  
  1050. /        ; n1 n2 -- n3            FORTH-WORDLIST        CORE
  1051.     Divide signed single n1 by signed single n2 returning the quotient n3,
  1052. according to default signed division algorithm.
  1053.  
  1054. /MOD        ; n1 n2 -- n3 n4        FORTH-WORDLIST        CORE
  1055.     As / but returning remainder n3 and quotient n4.
  1056.  
  1057. /STRING     ; c-addr1 u1 n -- c-addr2 u2    FORTH-WORDLIST        CORE
  1058.     Index into a string by n characters.
  1059.  
  1060. 0<        ; x -- flag            FORTH-WORDLIST        STRING
  1061.     TRUE iff x viewed as a signed single is less than zero.
  1062.  
  1063. 0<>        ; x -- flag            FORTH-WORDLIST        CORE
  1064.     TRUE iff x is non-zero.
  1065.  
  1066. 0=        ; x -- flag            FORTH-WORDLIST        CORE EXT
  1067.     TRUE iff x is zero.
  1068.  
  1069. 0>        ; x -- flag            FORTH-WORDLIST        CORE
  1070.     TRUE iff x viewed as a signed single is greater than zero.
  1071.  
  1072. 1+        ; n|u1 -- n|u2            FORTH-WORDLIST        CORE
  1073.     Add one (1) to two's-complement wrapping n|u1.
  1074.  
  1075. 1-        ; n|u1 -- n|u2            FORTH-WORDLIST        CORE
  1076.     Subtract one (1) from two's-complement wrapping n|u1.
  1077.  
  1078. 2!        ; x1 x2 a-addr --        FORTH-WORDLIST        CORE
  1079.     Store a double-cell number at the two cells starting at a-addr. Store
  1080. in the order x2 x1.
  1081.  
  1082. 2*        ; x1 -- x2            FORTH-WORDLIST        CORE
  1083.     Left-shift x1 one bit, shifting zeroes into the lowest bit.
  1084.  
  1085. 2/        ; x1 -- x2            FORTH-WORDLIST        CORE
  1086.     Right-shift x1 one bit, shifting zeroes into the highest bit.
  1087.  
  1088. 2>R        ; x1 x2 --     R: -- x1 x2    FORTH-WORDLIST        CORE EXT
  1089.     Move two items from data stack to return stack in specific order.
  1090. See 2R>
  1091.  
  1092. 2@        ; a-addr -- x1 x2        FORTH-WORDLIST        DOUBLE
  1093.     Fetch the double-cell item stored at a-addr to the data stack.
  1094.  
  1095. 2DROP        ; x1 x2 --            FORTH-WORDLIST        CORE
  1096.     Drop top two stack items.
  1097.  
  1098. 2DUP        ; x1 x2 -- x1 x2 x1 x2        FORTH-WORDLIST        CORE
  1099.     Duplicate top double-cell stack entry.
  1100.  
  1101. 2LITERAL    ; x x --            FORTH-WORDLIST        CORE
  1102.     Consume at compile time the top two stack entries and compile
  1103. as a double-cell literal to be deposited on the runtime stack at execution
  1104. of the construct into which the 2LITERAL is compiled.
  1105.  
  1106. 2OVER        ; x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2    FORTH-WORDLIST    CORE
  1107.     Copy the second double-cell data stack entry over the top double-cell
  1108. data stack entry.
  1109.  
  1110. 2R>        ; -- x1 x2    R: x1 x2 --        FORTH-WORDLIST    CORE EXT
  1111.     Undo the effect of 2>R (q.v.) returning two items from the return stack
  1112. to the data stack in specific order.
  1113.  
  1114. 2SWAP        ; x1 x2 x3 x4 -- x3 x4 x1 x2        FORTH-WORDLIST    CORE
  1115.     Swap the top two double-cell data stack entries.
  1116.  
  1117. :        ; --                FORTH-WORDLIST        CORE
  1118.     Parse a name from the input stream and start a new definition. Saves
  1119. an internal record of the depth of the data stack at start of compilation.
  1120.  
  1121. :NONAME        ; --xt                FORTH-WORDLIST        CORE
  1122.     Start a headerless definition whose execution token will be deposited
  1123. on the data stack after the next occurence of ; (semi-colon). Saves an internal
  1124. record of the depth of the data stack at start of compilation.
  1125.  
  1126. ;        ; --                FORTH-WORDLIST        CORE EXT
  1127.     Terminate a definition commenced by ; (colon) or :NONAME. See if depth
  1128. of stack has changed since initiation of compilation. THROW a -52 if depth has
  1129. changed.
  1130.  
  1131. <        ; n1 n2 -- flag            FORTH-WORDLIST        CORE
  1132.     TRUE iff signed single n1 is less than signed single n2.
  1133.  
  1134. <#        ; --                FORTH-WORDLIST        CORE
  1135.     Commence formatting a numeric output string.
  1136.  
  1137. <>        ; x1 x2 -- flag            FORTH-WORDLIST        CORE EXT
  1138.     TRUE iff x1 is not the same bit pattern as x2.
  1139.  
  1140. =        ; x1 x2 -- flag            FORTH-WORDLIST        CORE
  1141.     TRUE iff x1 is the same bit pattern as x2.
  1142.  
  1143. >        ; n1 n2 -- flag            FORTH-WORDLIST        CORE
  1144.     TRUE iff signed single n1 is greater than signed single n2.
  1145.  
  1146. >BODY        ; xt -- a-addr            FORTH-WORDLIST        CORE
  1147.     Convert the execution token of a CREATEd object into its data address.
  1148. If xt doesn't represent a child of CREATE then THROW a -31.
  1149.  
  1150. >IN        ; -- a-addr            FORTH-WORDLIST        CORE
  1151. >NUMBER     ; ud1 c-addr1 u1 -- ud2 c-addr2 u2    FORTH-WORDLIST    CORE
  1152.     Converts the string at c-addr1 u1 to a double-cell number in the current
  1153. number base. All characters in the string must be digits. Returns the address and
  1154. count of unconverted characters remaining in string.
  1155.  
  1156. >R        ; x --    R: -- x            FORTH-WORDLIST        CORE
  1157.     Move the top data stack item to the top of the return stack. Compile-only.
  1158.  
  1159. ?DO        ; u1 u2 --            FORTH-WORDLIST        CORE EXT
  1160.     Consume an outer (u1) and inner (u2) loop limit. If they are not identical,
  1161. commence the body of the loop.
  1162.  
  1163. ?DUP        ; x -- x x | 0            FORTH-WORDLIST        CORE EXT
  1164.     Duplicate the top data stack item iff non-zero.
  1165.  
  1166. ?STACK        ; i*j -- i*j | -        NONSTANDARD-WORDLIST    --
  1167.     ABORT if stack has underflowed or overflowed.
  1168.  
  1169. @        ; a-addr -- x            FORTH-WORDLIST        CORE
  1170.     Fetch x from the cell at a-addr.
  1171.  
  1172. [        ; --                FORTH-WORDLIST        CORE
  1173.     Enter interpretive state. Compile-time only.
  1174.  
  1175. [']        ; -- | abort            FORTH-WORDLIST        CORE
  1176.     At compile time, append the execution token for the following name
  1177. in the input stream as a literal to the current definition.
  1178.  
  1179. [CHAR]        ; --    Execution: -- char    FORTH-WORDLIST        CORE
  1180.     At compile time, append a numeric literal to the current definition representing
  1181. the first character of the next non-blank string in the input stream.
  1182.  
  1183. ]        ; --                FORTH-WORDLIST        CORE
  1184.     Enter compile state.
  1185.  
  1186. ABORT        ; --                FORTH-WORDLIST        EXCEPTION EXT
  1187.     Compile a -1 THROW. Compilation only.
  1188.  
  1189. ABORT"        ; ccc<"> --            FORTH-WORDLIST        EXCEPTION EXT
  1190.     Consume a string terminated by double-quote and compile the string as an error
  1191. message and a -2 THROW which will have the effect of printing the message
  1192.  
  1193. ABOUT        ; --                NONSTANDARD-WORDLIST    ---
  1194.     Prints a revision message followed by a message about Jax4th's Lack of Warranty as free software.
  1195.  
  1196. ABS        ; n -- u            FORTH-WORDLIST        CORE
  1197.     Return absolute value u of n.
  1198.  
  1199. ABSTOCODE    ; abs-addr -- code-addr        SYSTEM-WORDLIST        ---
  1200.     Convert a Windows NT address to a Jax4th user-code-space-relative address.
  1201.  
  1202. ABSTODATA    ; abs-addr -- data-addr        SYSTEM-WORDLIST        ---
  1203.     Convert a Windows NT address to a Jax4th data-space-relative address.
  1204.  
  1205. ACCEPT        ; c-addr +n1 -- +n2        FORTH-WORDLIST        CORE
  1206.     Accept up to +n1 characters at c-addr from the user, returning +n2, the
  1207. count of characters actually received before a possible terminating EOL.
  1208.  
  1209. AGAIN        ; --                FORTH-WORDLIST        CORE
  1210.     At compile time, consume a "dest" branch destination from the control flow stack.
  1211. At runtime, cause a loop back to the corresponding BEGIN.
  1212.     
  1213. ALIGN        ; --                FORTH-WORDLIST        CORE
  1214.     Align data space to a boundary corresponding to the alignment needs of the host
  1215. architecture.
  1216.  
  1217. ALIGNED     ; addr -- a-addr        FORTH-WORDLIST        CORE
  1218.     If the address addr on the data stack is not aligned, increment it to the next
  1219. aligned address.
  1220.  
  1221. ALLOT        ; n --                FORTH-WORDLIST        CORE
  1222.     Allot n address units in the data space.
  1223.  
  1224. ALSO        ; --                FORTH-WORDLIST        SEARCH EXT
  1225.     Dup the top of the wordlist stack.
  1226.  
  1227. AND        ; x1 x2 -- x3            FORTH-WORDLIST        CORE
  1228.     x3 is the bitwise AND of x1 and x1.
  1229.  
  1230. ASCIIZ        ; c-addr u -- addr        SYSTEM-WORDLIST        ---
  1231.     Copies a character string specified by c-addr u as a null-terminated ASCII string into a system buffer whose
  1232. address is then returned. This system buffer is overwritten each time ASCIIZ is called. Used for NT system calls which
  1233. don't accept unicode. The buffer is 256 ASCII characters long, and the null terminator will use up one of these character
  1234. addresses, so the maxiumum value for the argument  u  is thus 255.
  1235.  
  1236.     NOTE: The address returned by ASCIIZ is a data address, and must be converted via DATATOABS before being
  1237. passed to a system call.
  1238.  
  1239. AT-XY        ; u1 u2 --            FORTH-WORDLIST        FACILITY
  1240.     Move the cursor to the xy position represented by u1 (x) u2 (y).
  1241.  
  1242. B!        ; byte addr --            NONSTANDARD-WORDLIST    ---
  1243.     Store a byte to addr.
  1244.  
  1245. B@        ; addr -- byte            NONSTANDARD-WORDLIST    ---
  1246.     Fetch a byte from addr.
  1247.  
  1248. BASE        ; a-addr            FORTH-WORDLIST        CORE
  1249.     Return the address where is stored the numeric conversion base.
  1250.  
  1251. BEGIN        ; -- dest            FORTH-WORDLIST        CORE
  1252.  
  1253. BIN        ; fam1 -- fam2            FORTH-WORDLIST        FILE
  1254.     Set the file mode for binary access. A no-op in Jax4th for Windows
  1255. NT, just included for source compatibility.
  1256.  
  1257. BL        ; -- char            FORTH-WORDLIST        CORE
  1258.     Leaves the character for a blank space on the stack.
  1259.  
  1260. BLK        ; -- a-addr            FORTH-WORDLIST        BLOCK
  1261.     Indicates the current compilation block, or the user input device if 0.
  1262.  
  1263. BLOCK        ; u -- a-addr            FORTH-WORDLIST        BLOCK
  1264.     Returns the address of the BLOCK buffer containing block u, if available.
  1265. Will THROW if, for any of a variety of reasons, the requested BLOCK not available.
  1266. The file being used for BLOCKs is the file whose file-id from OPEN-FILE is placed
  1267. in the Jax4th variable BLOCK-FILE, q.v.
  1268.  
  1269. BLOCK-FILE    ; -- a-addr            NONSTANDARD-WORDLIST    ---
  1270.     Variable used to determine the file used for BLOCK I/O. Contains a file-id
  1271. obtained from OPEN-FILE and placed in BLOCK-FILE by the user. Many files may be kept
  1272. open and their file-id's stored elsewhere to be swapped in and out of BLOCK-FILE in
  1273. the course of your operations, should you so desire. However, remember to EMPTY-BUFFERS
  1274. if you change the file-id in BLOCK-FILE and want to read in a same-numbered BLOCK, or
  1275. you will get the old BLOCK from the previous file (which will still be valid from the
  1276. point of view of the BLOCK subsystem, which doesn't watch you swapping file-id's in
  1277. BLOCK-FILE).
  1278.  
  1279.     For example, here's how to load the example code (if you started Jax4th in
  1280. the EXAMPLE directory):
  1281.  
  1282.     S" JX4EXAMP.BLK" R/O OPEN-FILE .
  1283.     0  ok1
  1284.     BLOCK-FILE !
  1285.      ok0
  1286.     1 LOAD
  1287.  
  1288. BUFFER        ; u -- a-addr            FORTH-WORDLIST        BLOCK
  1289.     Returns the address of the buffer currently assigned to block u, or assigns
  1290. one to block u if block u is not currently resident. If an UPDATEd buffer is thus
  1291. reassigned to make room for block u, the UPDATEd block will be written out to mass
  1292. storage. Block u is not read in by BUFFER; a BLOCK operation is required for that
  1293. to occur.
  1294.  
  1295. BYE        ; --                FORTH-WORDLIST        TOOLS EXT
  1296.     Exit the system, saying goodbye. Does not explicitly close any objects
  1297. except those opened by Jax4th itself. Clean up after yourself!
  1298.  
  1299. C!        ; c c-addr --            FORTH-WORDLIST        CORE
  1300.     Store a character c to a character-aligned address c-addr.
  1301.  
  1302. C,        ; char --            FORTH-WORDLIST        CORE
  1303.     Allot one char's worth of data space and store char there.
  1304.  
  1305. C@        ; c-addr -- char        FORTH-WORDLIST        CORE
  1306.     char is the char which is located at c-addr.
  1307.  
  1308. CATCH        ; i*x xt -- j*x 0 | i*x n)    FORTH-WORDLIST        EXCEPTION
  1309.     CATCH a THROW, e.g., : TEST ['] FOO CATCH ;
  1310.  
  1311.     If the return is j*x 0 no THROW was encountered in the execution of
  1312. FOO otherwise n is the THROW code and the stack is the depth it was before
  1313. CATCH commenced execution, though not necessarily containing the same
  1314. items.
  1315.  
  1316. CATCHFIRSTCATCH ; --                INTERNALS-WORDLIST    ---
  1317.  
  1318. CELL+        ; a-addr1 -- a-addr2        FORTH-WORDLIST        CORE
  1319.     Add the number of address units between two adjacent aligned addresses
  1320. to a-addr1 producing a-addr2.
  1321.  
  1322. CELLS        ; n1 -- n2            FORTH-WORDLIST        CORE
  1323.     n2 is n1 times the number of address units in a cell.
  1324.  
  1325. CHAR        ; -- char            FORTH-WORDLIST        CORE
  1326.     Parses for a char, returning the char value upon the data stack. Discards
  1327. all text in input stream after char before the next delimiter.
  1328.  
  1329. CHAR+        ; c-addr1 -- c-addr2        FORTH-WORDLIST        CORE
  1330.     Add the number of address units between two adjacent character-aligned addresses
  1331. to c-addr1 producing c-addr2.
  1332.  
  1333. CHARS        ; n1 -- n2            FORTH-WORDLIST        CORE
  1334.     n2 is n1 times the number of address units in a char.
  1335.  
  1336. CHECKDEPTH    ; j*x -- j*x [ 0 | n if stack has changed ]    INTERNALS-WORDLIST    ---
  1337.  
  1338. CLOSE-FILE    ; fileid -- ior ( == system error if failure, == 0 if success)    FORTH-WORDLIST        FILE
  1339.     Close the file represented by fileid, returning system-dependent io result ior (0 on success).
  1340.  
  1341. CMOVE        ; c-addr1 c-addr2 u --        FORTH-WORDLIST        CORE
  1342.     Move u characters from c-addr1 to c-addr2 starting at low addresses
  1343. and moving higher.
  1344.  
  1345.     See CMOVE> MOVE
  1346.  
  1347. CMOVE>        ; c-addr1 c-addr2 u --        FORTH-WORDLIST        CORE
  1348.     Move u characters from c-addr1 to c-addr2 starting at high addresses
  1349. and progressing lower. The concept of "C-Move-Right" is that it is responsible
  1350. for moving data higher in memory when the regions overlap. It handles this by
  1351. copying data regions end-to-front to avoid replication in a "rightwards" (i.e.,
  1352. higher in memory) overlapping move.
  1353.  
  1354.     See CMOVE MOVE
  1355.  
  1356. CODETOABS    ; code-addr -- abs-addr        SYSTEM-WORDLIST        ---
  1357.     Convert a user-code-relative address to an absolute address. Such calculations
  1358. should generally be made at runtime, not at compile time.
  1359.  
  1360. CODETODATA    ; code-addr -- data-addr    SYSTEM-WORDLIST        ---
  1361.     Convert a user-code-relative address to a user data address. Such calculations
  1362. should generally be made at runtime, not at compile time.
  1363.  
  1364.  
  1365. COLD        ; --                NONSTANDARD-WORDLIST    ---
  1366.     Executed when Jax4th starts up to initialize the system, thn executes the FORTH command
  1367. line (if any) that accompanied the invocation of Jax4th, then returns the system to QUIT. You
  1368. may execute this any time, but be aware your original invocation command line will be re-executed.
  1369.  
  1370. COMPARE     ; c-addr1 u1 c-addr2 u2 -- n    FORTH-WORDLIST        STRING
  1371.     If the strings at c-addr1 u1 and c-addr2 u2 are char-for-char the same,
  1372. including length, return 0. If u1 and u2 are different, compare up to the length
  1373. of the shorter string. If the two strings are identical up to the length of the
  1374. shorter string, return -1 if u1 < u2 and 1 otherwise. If the two strings are not
  1375. identical up to the length of the shorter, return -1 if the char value of the
  1376. first nonmatching char c-addr1[n] < c-addr2[n] and return 1 otherwise.
  1377.  
  1378. COMPILE,    ; xt --                FORTH-WORDLIST        CORE EXT
  1379.     Append the execution token xt to the current definition.
  1380.  
  1381. ConsoleMode    ; -- a-addr            SYSTEM-WORDLIST        --
  1382.     Contains the last Console Mode setting by the system. Applications which
  1383. change the Console Mode should update this variable.
  1384.  
  1385. CONSTANT    ; x "name" --            FORTH-WORDLIST        CORE
  1386.     Create a word named "name" which at runtime returns x on the data stack.
  1387.  
  1388. COUNT        ; c-addr1 -- c-addr2 u        FORTH-WORDLIST        CORE
  1389.     Convert the counted string a c-addr1 to the address c-addr2 and count
  1390. u.
  1391.  
  1392. CR        ; --                FORTH-WORDLIST        CORE
  1393.     Emit a newline to the current output device.
  1394.  
  1395. CREATE        ; "name" --            FORTH-WORDLIST        CORE
  1396.     CREATE a new word "name" which at runtime returns the address of the
  1397. current end of data allocation. No data space is alloted.
  1398.  
  1399.     See >BODY ALLOT DOES>
  1400.  
  1401. CREATE-FILE    ; c-addr u x1 -- x2 ior (== 0 | system err)    FORTH-WORDLIST        FILE
  1402.     Create a file whose name is specified by c-addr u with access attributes x1.
  1403. Return x2 the file identifier and result of either 0 for success or the value returned
  1404. by the Win32 API call GetLastError() if not successful.
  1405.  
  1406.     See: BIN CLOSE-FILE DELETE-FILE OPEN-FILE R/O R/W  READ-FILE REPOSITION-FILE RESIZE-FILE WRITE-FILE
  1407.  
  1408. D+        ; ud|d1 ud|d2 -- ud|d3        FORTH-WORDLIST        DOUBLE
  1409.     ud|d3 is the sum of ud|d1 and ud|d2.
  1410.  
  1411. D-        ; ud|d1 ud|d2 -- ud|d3        FORTH-WORDLIST        DOUBLE
  1412.     ud|d3 is the difference of ud|d1 minus ud|d2.
  1413.  
  1414. D.        ; d --                FORTH-WORDLIST        DOUBLE
  1415.     Print the signed double d to the current output device in the current
  1416. number conversion base.
  1417.  
  1418. D=        ; xd1 xd2 -- flag        FORTH-WORDLIST        DOUBLE
  1419.     Flag is TRUE iff xd1 is bit-for-bit equal to xd2.
  1420.  
  1421. D>S        ; d1 -- n1            FORTH-WORDLIST        DOUBLE
  1422.     Convert the signed double-cell number d1 to the signed single n1. Silent
  1423. truncation occurs if d1 is to large to be represented in n1.
  1424.  
  1425. D0=        ; xd -- flag            FORTH-WORDLIST        DOUBLE
  1426.     flag is TRUE iff xd is 0.0
  1427.  
  1428. DABS        ; d -- ud            FORTH-WORDLIST        DOUBLE
  1429.     Returns the absolute value of d.
  1430.  
  1431. DATATOABS    ; data-addr -- abs-addr        SYSTEM-WORDLIST        ---
  1432.     Convert a data-relative address to an absolute address.
  1433.  
  1434. DATATOCODE    ; data-addr -- code-addr    SYSTEM-WORDLIST        ---
  1435.     Convert a data-relative address to a code-relative address.
  1436.  
  1437. DECIMAL     ; --                FORTH-WORDLIST        CORE
  1438.     Set the contents of BASE q.v. to 10r10.
  1439.  
  1440. DEFINITIONS    ; --                FORTH-WORDLIST        SEARCH
  1441.     Sets the current compilation wordlist to the first wordlist in the
  1442. search order.
  1443.     See: GET-ORDER ORDER SET-ORDER
  1444.  
  1445. DELETE-FILE    ; c-addr u -- ior (== 0 | system err)    FORTH-WORDLIST    FILE
  1446.     Delete a file whose name is specified by c-addr u with access attributes x1.
  1447. Return x2 the file identifier and result of either 0 for success or the value returned
  1448. by the Win32 API call GetLastError() if not successful.
  1449.  
  1450.     See: BIN CLOSE-FILE CREATE-FILE OPEN-FILE R/O R/W  READ-FILE REPOSITION-FILE RESIZE-FILE WRITE-FILE
  1451.  
  1452. DEPTH        ; i*x -- i*x i            FORTH-WORDLIST        CORE
  1453.     Return on the data stack the depth consumed currently on the data stack
  1454. prior to the execution of DEPTH.
  1455.  
  1456. DETOKEN     ; user-xt -- code-offset        INTERNALS-WORDLIST    ---
  1457.     Don't use this.
  1458.  
  1459. DIGIT        ; char n1 -- n2 true | char false    NONSTANDARD-WORDLIST    ---
  1460.      Return n2 and TRUE on the data stack if n2 is the value of the digit char
  1461. in base n1. Return the original char and FALSE if it is not a valid digit in base
  1462. n1.
  1463.  
  1464.     See >NUMBER NUMBER BASE
  1465.  
  1466. DNEGATE     ; d1 -- d2            FORTH-WORDLIST        CORE
  1467.     Signed double d2 is the negated value of signed double d1.
  1468.  
  1469. DO        ; u1 u2 --            FORTH-WORDLIST        CORE
  1470.     Commences a DO .. LOOP structure. The start index is u2, the termination
  1471. index is u1.
  1472.  
  1473.     See: ?DO +LOOP LOOP LEAVE UNLOOP
  1474.         
  1475. DOCONST     ; -- x              INTERNALS-WORDLIST    ---
  1476.     Execution engine for CONSTANT
  1477.  
  1478. DODLIT        ; --                 INTERNALS-WORDLIST    ---
  1479.     Execution engine for DLITERAL
  1480.  
  1481. DODO        ; u1 u2 --            INTERNALS-WORDLIST    ---
  1482.     Execution engine for DO
  1483.  
  1484. DODOES        ; -- x                INTERNALS-WORDLIST    ---
  1485.     Execution engine for DOES>
  1486.  
  1487. DODOTQUOTE    ; --                INTERNALS-WORDLIST    ---
  1488.     Execution engine for ."
  1489.  
  1490. DOELSE        ; --                INTERNALS-WORDLIST    ---
  1491.     Execution engine for ELSE
  1492.  
  1493. DOES>        ; --                FORTH-WORDLIST        CORE
  1494.     Assign the stream of execution following the DOES> to the most
  1495. recently CREATEd word.
  1496.  
  1497. DOIF        ; flag --             INTERNALS-WORDLIST    ---
  1498.     Execution engine for IF
  1499.  
  1500. DOKDOTQUOTE    ; --                INTERNALS-WORDLIST    ---
  1501.     Print strings stored in the kernel exe data section.
  1502.  
  1503. DOKWORDLIST    ; -- a-addr            INTERNALS-WORDLIST    ---
  1504.     Execution engine for kernel WORDLISTs.
  1505.  
  1506. DOLIT        ; -- x                INTERNALS-WORDLIST    ---
  1507.     Execution engine for LITERAL
  1508.  
  1509. DOMARKER    ; -- a-addr            INTERNALS-WORDLIST    ---
  1510.     Execution engine for MARKER words.
  1511.  
  1512. DOLOOP        ; --                INTERNALS-WORDLIST    ---
  1513.     Execution engine for LOOP
  1514.  
  1515. DOPLUSLOOP    ; n1 --                INTERNALS-WORDLIST    ---
  1516.     Execution engine for +LOOP
  1517.  
  1518. DOQDO        ; u1 u2 --            INTERNALS-WORDLIST    ---
  1519.     Execution engine for ?DO
  1520.  
  1521. DOSQUOTE    ; -- c-addr u            INTERNALS-WORDLIST    ---
  1522.     Execution engine for S"
  1523.  
  1524. DOUNTIL     ; flag --            INTERNALS-WORDLIST    ---
  1525.     Execution engine for UNTIL
  1526.  
  1527. DOUNTILNOT    ; flag --            INTERNALS-WORDLIST    ---
  1528.     Execution engine for an anonymous function used in the kernel
  1529.  
  1530. DOWORDLIST    ; -- a-addr            INTERNALS-WORDLIST    ---
  1531.     Execution engine for WORDLISTs defined by the user.
  1532.  
  1533. DP        ; -- a-addr            INTERNALS-WORDLIST    ---
  1534.     Variable containing the data pointer.
  1535.  
  1536. DPL        ; -- a-addr            INTERNALS-WORDLIST    ---
  1537.     Variable containing the position of the decimal point in the most-recently
  1538. parsed number entry.
  1539.  
  1540. DROP        ; x --                FORTH-WORDLIST        CORE
  1541.     Discard top data stack item.
  1542.  
  1543. DUM/MOD     ; d1 n1 -- n2 d2        NONSTANDARD-WORDLIST    ---
  1544.     Divides double d1 by n1 leaving double quotient d2 and modulus
  1545. n2.
  1546.  
  1547. DUMP        ; a-addr u --            FORTH-WORDLIST        TOOLS
  1548.     Formatted hex dump of memory starting from at least a-addr and
  1549. proceeding for at least u addresses. In Jax4th for Windows NT, the display
  1550. is by unicode characters, and Intel little-endian addresses are swapped in
  1551. pairs in the display to make character reading easier.
  1552.  
  1553. DUMPLINE    ; a-addr1 -- a-addr2
  1554.  
  1555. DUP        ; x -- x x            FORTH-WORDLIST    CORE
  1556.     Duplicate top data stack item.
  1557.  
  1558. EKEY        ; -- u                FORTH-WORDLIST    FACILITY EXT
  1559.     Return the value of the next keypress event. The 32-bit value returned
  1560. by Jax4th encoded as follows:
  1561.  
  1562.     Bits  0-15: The Unicode value (if any) of the key pressed.
  1563.     Bits 16-31: The Windows Virtual Key Code of the key pressed.
  1564.  
  1565.     For example, pressing the 'A' key on my keyboard with no shift or
  1566. capslock results in the hex value 00410061 where 0041 is the Windows Virtual
  1567. Key Code and 0061 ('a') is the Unicode value of the character resulting.
  1568. Pressing the <PgUp> key results in 00210000, a VKC of 0021 and no Unicode
  1569. character assigned.
  1570.  
  1571. ELSE        ; orig1 -- orig2        FORTH-WORDLIST    CORE
  1572.     Indicates the alternate execution branch when an IF test fails.
  1573.  
  1574. EMIT            ; char --        FORTH-WORDLIST    CORE
  1575.     Send the character char to the current output device.
  1576.  
  1577. EMPTY-BUFFERS        ; --            FORTH-WORDLIST    BLOCK
  1578.     Discard the contents of all disk buffers used by the BLOCK facility
  1579. and mark them as un-UPDATEd.
  1580.  
  1581. ENABLE_ECHO_INPUT    ; -- x            SYSTEM-WORDLIST
  1582.     Constant for SetConsoleMode.
  1583.  
  1584. ENABLE_LINE_INPUT    ; -- x            SYSTEM-WORDLIST
  1585.     Constant for SetConsoleMode.
  1586.  
  1587. ENABLE_MOUSE_INPUT    ; -- x            SYSTEM-WORDLIST
  1588.     Constant for SetConsoleMode.
  1589.  
  1590. ENABLE_PROCESSED_INPUT    ; -- x            SYSTEM-WORDLIST
  1591.     Constant for SetConsoleMode.
  1592.  
  1593. ENABLE_WINDOW_INPUT    ; -- x            SYSTEM-WORDLIST
  1594.     Constant for SetConsoleMode.
  1595.  
  1596. EVALUATE    ; i*x c-addr u -- j*x        FORTH-WORDLIST    CORE, BLOCK
  1597.     Interpret the string specified by c-addr u. SOURCE-ID
  1598. is -1 while this is taking place.
  1599.  
  1600. ENVIRONMENT?    ; c-addr u -- false | i*x true    FORTH-WORDLIST    CORE
  1601.     Answer the environmental query specified by c-addr u and
  1602. return TRUE or answer FALSE if the answer isn't known. Jax4th for
  1603. Windows NT can't answer any environemental queries until some of these
  1604. answers are loaded, e.g., in UTILS\UTILS.UTF.
  1605.  
  1606. EXECUTE     ; i*x xt -- j*x            FORTH-WORDLIST    CORE
  1607.     Execute the word whose execution token is on top of the data stack.
  1608.  
  1609. EXETOLINK    ; a-addr1 -- a-addr2        INTERNALS-WORDLIST
  1610.     Convert a data-relative address of an execution field to the data-
  1611. relative address of the corresponding link field.
  1612.  
  1613.  
  1614. EXETONAME    ; a-addr -- c-addr        INTERNALS-WORDLIST
  1615.     Convert a data-relative address of an execution field to the data-
  1616. relative address of the corresponding name field.
  1617.  
  1618. EXIT        ; --    R: nest-sys --        FORTH-WORDLIST    CORE
  1619.     Unnest from  the currently executing definition.
  1620.  
  1621. FALSE        ; -- flag            FORTH-WORDLIST    CORE EXT
  1622.     Returns 0 on the data stack.
  1623.  
  1624. FERROR        ; -- a-addr            NONSTANDARD-WORDLIST
  1625.     Variable containing the last error reported by INCLUDE-FILE, if any.
  1626.  
  1627. FILE-POSITION    ; fileid -- ud ior (0= success , nz== last error    FORTH-WORDLIST    FILE
  1628.     Return the current offset in the file represented by fileid at
  1629. which or from which the next write or read will take place. This is a
  1630. deferred word and is vectored at startup to the Unicode version FILE-POSITIONW
  1631. in which ud is a number of characters. See REPOSITION-FILE
  1632.  
  1633. FILE-POSITIONA    ; fileid -- ud ior (0= success , nz== last error    NONSTANDARD-WORDLIST
  1634.     Ascii version of FILE-POSITION. ud is bytes.
  1635.  
  1636. FILE-POSITIONW    ; fileid -- ud ior (0= success , nz== last error    NONSTANDARD-WORDLIST
  1637.     Unicode version of FILE-POSITION. ud is widechars.
  1638.  
  1639. FILE-SIZE    ; fileid -- ud ior        FORTH-WORDLIST    FILE
  1640.     If ior returns zero, ud is the size of the file represented by fileid. This
  1641. is a deferred word and is vectored at startup to the Unicode version FILE-SIZEW.
  1642. See FILE-POSITION.
  1643.  
  1644. FILE-SIZEA    ; fileid -- ud ior        NONSTANDARD-WORDLIST
  1645.     Ascii version of FILE-SIZE. ud is bytes.
  1646.  
  1647. FILE-SIZEW    ; fileid -- ud ior        NONSTANDARD-WORDLIST
  1648.     Unicode version of FILE-SIZE. ud is widechars.
  1649.  
  1650. FILL        ; c-addr u char --        FORTH-WORDLIST    CORE
  1651.     Fill the string specified by c-addr u with char.
  1652.  
  1653. FIND        ; ( c-addr -- c-addr 0 | xt 1 | xt -1 )            FORTH-WORDLIST
  1654.     Find the name represented by the counted string at c-addr in the current
  1655. dictionary search order. Return either the same c-addr and 0 if not found, or the
  1656. execution token xt and 1 if the word is IMMEDIATE and -1 if it is not.
  1657.  
  1658. FIRSTCATCH    ; --    R: -- catch-sys        INTERNALS-WORDLIST
  1659.     Generate the default CATCH frame the system uses to field all otherwise
  1660. uncaught THROWS.
  1661.  
  1662. FLUSH        ; --                FORTH-WORDLIST    BLOCK
  1663.     Write all UPDATEd BLOCK buffers to disk and mark them unUPDATEd.
  1664.  
  1665. FM/MOD        ; d1 n1 -- n2 n3        FORTH-WORDLIST    CORE
  1666.     Return the result of floored division of signed single n1 upon signed double d1
  1667. as quotient n3 and modulus n2.
  1668.  
  1669.  
  1670. FORTH        ; --                FORTH-WORDLIST    SEARCH EXT
  1671.     Makes the FORTH-WORDLIST the first wordlist in the dictionary search
  1672. order without deepening that search order.
  1673.     See also: FORTH-WORDLIST
  1674.  
  1675. FORTH-WORDLIST    ; -- wid            FORTH-WORDLIST    SEARCH
  1676.     Returns the wid representing the FORTH-WORDLIST.
  1677.     See also: FORTH WORDLIST
  1678.  
  1679. FreeLibrary    ; hLibModule --            SYSTEM-WORDLIST
  1680.     Frees the library module represendted by hLibModule which was previously
  1681. opened by the user via the Jax4th for NT word LoadLibraryEx (q.v.).
  1682.  
  1683. GET-CURRENT    ; -- wid            FORTH-WORDLIST    SEARCH
  1684.     Returns the wid representing the current compilation wordlist.
  1685.  
  1686. GET-ORDER    ; ( -- wid1 .. widn n)        FORTH-WORDLIST    SEARCH
  1687.     Returns the wordlist id's for all wordlists in the dictionary search order topped
  1688. with the number n of wordlists in the order (hence, the number of wid's below n on the stack).
  1689.  
  1690. GETCOMMANDLINE    ; -- c-addr u            SYSTEM-WORDLIST
  1691.     Returns Forth address and count of the command line with which Jax4th was invoked.
  1692.  
  1693. GetConsoleMode    ; -- LastErr | TRUE        SYSTEM-WORDLIST
  1694.     Instances the ConsoleMode variable and returns TRUE for success or the error code
  1695. returned by Win32's GetLastError() API if failed.
  1696.  
  1697. GetProcAddress    ; [lpszProc | ordinal] hModule -- abs-addr | nil    SYSTEM-WORDLIST
  1698.  
  1699.     Given the absolute address of a null-terminated ASCII string (See: ASCIIZ) and the handle to a library module,
  1700. performs the GetProcAddress call and returns either the absolute address of the named procedure or 0 indicating failure,
  1701. in which case the Forth variable LastError will hold the error code (if subsequently examined before any console I/O takes
  1702. place). Alternatively, the first parameter to this call may be the ordinal number of the desired routine, in which case
  1703. the upper 16 bits of such a number must be zeroes (0). Does no sanity checking on its parameters.
  1704.  
  1705. See: ASCIIZ FreeLibrary LoadLibraryEx SYSCALL
  1706.  
  1707. HEADER        ; c-addr u --            INTERNALS-WORDLIST
  1708.     Creates a name header, not linked in, from the string specified
  1709. by c-addr u.
  1710.  
  1711. HERE        ; -- addr            FORTH-WORDLIST    CORE
  1712.     Returns the next ALLOTable address in data space.
  1713.  
  1714. HEX        ; --                FORTH-WORDLIST    CORE
  1715.     Changes number conversion base to 16 (hexadecimal).
  1716.  
  1717. HLD        ; a-addr            NONSTANDARD-WORDLIST
  1718.     Variable used by HOLD
  1719.  
  1720. HOLD        ; char --            FORTH-WORDLIST    CORE
  1721.     Store char at the beginning address of the pictured numeric output
  1722. string and decrement the pointer thereto so that the next HOLD operation will
  1723. do the same.
  1724.  
  1725. I        ; -- n|u            FORTH-WORDLIST    CORE
  1726.     Returns the current inner loop index of a DO .. LOOP-type
  1727. construction.
  1728.  
  1729. IF        ; flag --            FORTH-WORDLIST    CORE
  1730.     At compile time, leaves an "origin" on the control flow stack.
  1731. At runtime, consumes a flag and branches to the corresponding ELSE or
  1732. THEN (if no ELSE) iff the flag is FALSE.
  1733.     
  1734. IMMEDIATE    ; --                FORTH-WORDLIST    CORE
  1735.     Renders the most recently defined colon definition IMMEDIATE, that
  1736. is, one which executes at compile time, rather than having its execution
  1737. appended to the definition under construction. IMMEDIATE must be executed
  1738. after the semicolon (";") of the colon definition in question, and before
  1739. any other additions or alterations to the dictionary are made.
  1740.  
  1741. INCLUDE-FILE    ; -- i*x fileid -- j*x        FORTH-WORDLIST    FILE
  1742.     Interpret the entire file represented by fileid. The user is responsible
  1743. for obtaining fileid via a call to OPEN-FILE, etc. If for any reason the
  1744. interpretation ABORTs or THROWs, there is no guarantee about the state of
  1745. the file pointer: it's best to close the file and re-open it before reloading.
  1746.  
  1747. INCLUDED    ; -- i*x c-addr u -- j*x    FORTH-WORDLIST    FILE
  1748.     Attempt to open and unterpret the entire file whose name is represented by
  1749. c-addr u.  If for any reason the interpretation ABORTs or THROWs, there is no guarantee
  1750. about the state of the file pointer.
  1751.  
  1752. INTERNALS-WORDLIST    ; -- wid        FORTH-WORDLIST
  1753.     Wordlist containing many implementation details of Jax4th.
  1754.  
  1755. INTERPRET    ; ( --)                INTERNALS-WORDLIST
  1756.     Interpret the input stream.
  1757.  
  1758. INVALIDBLOCK    ; u -- flag            INTERNALS-WORDLIST
  1759.     flag is TRUE if u is not a valid BLOCK number in the file whose handle is
  1760. stored in BLOCK-FILE. If BLOCK- FILE's contents do not represent a valid file handle,
  1761. perform file i/o exception THROW -37. Used by BLOCK and REFILL.
  1762.  
  1763. INVERT        ; x1 -- x2            FORTH-WORDLIST CORE
  1764.     Reverses all bits of x1 yielding x2.
  1765.  
  1766. J        ; -- n|u            FORTH-WORDLIST CORE
  1767.     Sets compilation state.
  1768.  
  1769. KEY        ; -- char            FORTH-WORDLIST CORE
  1770.     Returns the next keypress from the standard character set.
  1771.  
  1772. KEY?        ; -- flag            FORTH-WORDLIST FACILITY
  1773.     Returns TRUE if a keypress is waiting in the range of 1Bh and
  1774. above, and also carriage return 0Dh.
  1775.  
  1776. LastError    ; -- a-addr            SYSTEM-WORDLIST
  1777.     Holds last error reported from I/O operation via Windows NT.
  1778.  
  1779. LEAVE        ; --    R: loop-sys --        FORTH-WORDLIST    CORE
  1780.     Clean off the loop stack and immediately LEAVE a loop.
  1781.  
  1782. LINKIT        ; --                INTERNALS-WORDLIST
  1783.     Link the current definition.
  1784.  
  1785. LINKTOEXE    ; a-addr1 -- a-addr2        INTERNALS-WORDLIST
  1786.     Convert a data-relative address of a link field to the data-
  1787. relative address of the corresponding execution field.
  1788.  
  1789. LINKTONAME    ; a-addr -- c-addr        INTERNALS-WORDLIST
  1790.     Convert a data-relative address of a link field to the data-
  1791. relative address of the corresponding name field.
  1792.  
  1793. LIST        ; u --                FORTH-WORDLIST    BLOCK EXT
  1794.     Display BLOCK u. A Forth file i/o THROW -37 will occur if the value in BLOCK-FILE is zero (0). A Block Read
  1795. THROW -33 will occur if the file handle in BLOCK-FILE is invalid. A Block Write THROW -34 will occur if an updated
  1796. buffer was waiting to be written but the operation failed. An invalid BLOCK number THROW -35 will occur if u is not
  1797. a valid BLOCK number in the BLOCK-FILE file.
  1798.  
  1799. LITERAL     ; x --                FORTH-WORDLIST    CORE
  1800.     Compile-only. Append the numeric literal x to the current definition.
  1801.  
  1802. LOAD        ; i*x u -- j*x            FORTH-WORDLIST    CORE
  1803.  
  1804.     Interpret BLOCK number u. A Forth file i/o THROW -37 will occur if the value in BLOCK-FILE is zero (0). A
  1805. Block Read THROW -33 will occur if the file handle in BLOCK-FILE is invalid. A Block Write THROW -34 will occur if
  1806. an updated buffer was waiting to be written but the operation failed. An invalid BLOCK number THROW -35 will occur
  1807. if u is not a valid BLOCK number in the BLOCK-FILE file.
  1808.  
  1809.     An attempt to perform 0 LOAD will invoke QUIT.
  1810.  
  1811. LoadLibraryEx    ; dwFlags 0 lpszLibFile -- hModule | 0    SYSTEM-WORDLIST
  1812.  
  1813.     Calls NT system to open the named module specified by the null-terminated Unicode string which is the third
  1814. parameter to this call. All S" strings are null-terminated, so their count may be dropped and the remaining address
  1815. passed to DATATOABS to provide this parameter. The other two parameters are, in order, the flag indicating whether
  1816. the initialization routine should be called for the library, and a reserved 0 parameter. See the Windows NT SDK for
  1817. further information on the call itself. Does no sanity checking on its parameters.
  1818.  
  1819.     The return is either the handle of the desired library module or a NULL for error, in which case the Forth variable
  1820. LastError will hold the error code (if subsequently examined before any console I/O takes place).
  1821.  
  1822. See: DATATOABS FreeLibrary S"
  1823.  
  1824. LOGIN        ; --                INTERNALS-WORDLIST
  1825.     Message seen at startup of Jax4th
  1826.  
  1827. LOGOFF        ; --                INTERNALS-WORDLIST
  1828.     Message seen on exit from Jax4th.
  1829.  
  1830.  
  1831. LOOP        ; dest --            FORTH-WORDLIST CORE
  1832.     Resolves the backwards branch of a DO or ?DO.
  1833.  
  1834. LSHIFT        ; x1 u -- x2            FORTH-WORDLIST CORE
  1835.     Left-shifts x1 by u places leaving x2.
  1836.  
  1837. M*        ; n1 n2 -- d            FORTH-WORDLIST CORE
  1838.     Multiplies two signed singles returning a signed double.
  1839.  
  1840. MAKEDOES    ; xt --                INTERNALS-WORDLIST
  1841.     Lays down the execution for a DOES> word. Don't use this word.
  1842.  
  1843. MAKETOKEN    ; code-offset -- user-xt    INTERNALS-WORDLIST
  1844.     Creates an execution token from an offset. Don't use this word.
  1845.  
  1846. MARKER        ; "name" --            FORTH-WORDLIST    CORE EXT
  1847.     Create a "forgettable" word which, when executed, restores the
  1848. dictionary to the precise state it was in before the MARKER word was
  1849. defined. Also unallots all data space that was alloted prior to the
  1850. MARKER word being defined, though this effect is not guaranteed in
  1851. the Standard. No checking for outstanding references to deleted
  1852. structures, e.g., disappearing wordlists in the search order, is
  1853. provided.
  1854.  
  1855. MAX        ; n1 n2 -- n3            FORTH-WORDLIST    CORE
  1856.     n3 is the signed maximum of n1 n2.
  1857.  
  1858. MIN        ; n1 n2 -- n3            FORTH-WORDLIST    CORE
  1859.     n3 is the signed minimum of n1 n2.
  1860.  
  1861. MOVE        ; addr1 addr2 u --        FORTH-WORDLIST    CORE
  1862.     Move the contents of u address units from the region starting at addr1 to the
  1863. region starting at addr2. Copy in the correct order to prevent replication in case of
  1864. overlapping memory regions.
  1865.  
  1866. NAMEWORDLIST    ; c-addr u -- wid        NONSTANDARD-WORDLIST
  1867.     Create a wordlist whose name will show in the ORDER dump of wordlist names. The name
  1868. is specified by c-addr u. NAMEWORDLIST is a convenience and not a Standard feature, nor
  1869. are NAMEWORDLIST constructions non-standard, unless a program depends on their name being
  1870. usable. Think of it as a debugging convenience.
  1871.  
  1872.     Named wordlists created by NAMEWORDLIST  are no different in
  1873. their internal structure than a wordlist created by WORDLIST (q.v.). The only
  1874. difference is that a NAMEWORDLIST has a regular Forth name header and a
  1875. WORDLIST is created with a header that tells the Jax4th interpreter that
  1876. it is a "headerless" item in the dictionary.
  1877.  
  1878. NAMETOEXE    ; c-addr -- a-addr        INTERNALS-WORDLIST
  1879.     Convert a data-relative address of a name field to the data-
  1880. relative address of the corresponding execution field.
  1881.  
  1882.  
  1883. NAMETOLINK    ; c-addr -- a-addr        INTERNALS-WORDLIST
  1884.     Convert a data-relative address of a name field to the data-
  1885. relative address of the corresponding link field.
  1886.  
  1887. NEGATE        ; n1 -- n2            FORTH-WORDLIST    CORE
  1888.     n2 is n1 negated.
  1889.  
  1890. NEST        ; --    R: -- sys        SYSTEM-WORDLIST
  1891.     This is the nesting engine of the Forth interpreter. Don't use this word!
  1892.  
  1893. NIP        ; x1 x2 -- x2            FORTH-WORDLIST    CORE EXT
  1894.     Remove the second data stack entry.
  1895.  
  1896. NONSTANDARD-WORDLIST    ; -- wid
  1897.     Wordlist containing nonstandard but generally useful Jax4th words.
  1898.  
  1899. NOOP        ; --
  1900.     Does nothing but waste a few CPU cycles.
  1901.  
  1902. NUMBER        ; c-addr1 u1 -- d TRUE | x x FALSE
  1903.     Converts the string at c-addr1 u1 to a double-cell number in the current
  1904. number base. Correctly handles sign and embedded decimal point. Returns false
  1905. if unconvertible characters were encountered.
  1906.  
  1907. okPrompt    ; --                INTERNALS-WORDLIST
  1908.     Guess what this does.
  1909.  
  1910. ONLY        ; --                FORTH-WORDLIST    SEARCH EXT
  1911.     Sets the minimum search order, consisting in the case of
  1912. Jax4th of the FORTH-WORDLIST alone.
  1913.  
  1914. OPEN-FILE    ; c-addr u x1 -- x2 ior (== 0 | system err)    FORTH-WORDLIST    FILE
  1915.  
  1916. OR        ; x1 x2 -- x3                FORTH-WORDLIST
  1917.     x3 is the bitwise OR of x1 and x2.
  1918.  
  1919. ORDER        ; --                    FORTH-WORDLIST
  1920.     Displays the dictionary search order and the compilation wordlist.
  1921.  
  1922. OVER        ; x1 x2 -- x1 x2 x1            FORTH-WORDLIST
  1923.     Copies data stack item x1 to top of stack.
  1924.  
  1925. PAD        ; -- c-addr                FORTH-WORDLIST
  1926.     Returns the character-aligned address of a scratch buffer. No
  1927. system words use this buffer, but its persistence is not guaranteed across
  1928. dictionary operations.
  1929.  
  1930. PAGE        ; --                    FORTH-WORDLIST    FACILITY
  1931.     Advance the output device by one "page", e.g., clear the screen
  1932. most of the time.
  1933.  
  1934. PARSE        ; ( char "ccc<char>" -- c-addr u)    FORTH-WORDLIST
  1935.  
  1936. PICK        ; xu .. x1 x0 u -- xu .. x1 x0 xu    FORTH-WORDLIST    CORE EXT
  1937.     Copy the u'th data stack item to top of data stack.
  1938.  
  1939. PLACE        ; c-addr1 u c-addr2            NONSTANDARD-WORDLIST
  1940.     An old favorite. Copy the counted string specified by c-addr1 u
  1941. to c-addr2.
  1942.  
  1943. POSTPONE    ; "name" --                FORTH-WORDLIST    CORE
  1944.     Append the compilation semantics of name to the current definition.
  1945.  
  1946. PREVIOUS    ; --                    FORTH-WORDLIST    SEARCH EXT
  1947.     Reduce the length of the search order discarding the first wordlist in the
  1948. order.
  1949.  
  1950. QUIT        ; ( --) ( R: i*x --)            FORTH-WORDLIST    CORE
  1951.     Return to the Forth interpreter, having cleared the return stack.
  1952.  
  1953. R>        ; -- x    R: x --                FORTH-WORDLIST    CORE
  1954.     Remove x from the top of the return stack and place it on the data stack.
  1955.  
  1956. R@        ; -- x    R: x -- x            FORTH-WORDLIST    CORE
  1957.     Copy the top element of the return stack to the data stack.
  1958.  
  1959. R/O        ; -- x                    FORTH-WORDLIST    FILE
  1960.     Indicates to certain FILE words that the access mode is read-only.
  1961.  
  1962. R/W        ; -- x                    FORTH-WORDLIST    FILE
  1963.     Indicates to certain FILE words that the access mode is read-write.
  1964.  
  1965. READ-FILE    ; c-addr u1 fileid -- u2 ior (== 0 | system err)    FORTH-WORDLIST    FILE
  1966.     Read u1 units to c-addr from file described by fileid. This
  1967. is a deferred word and is vectored at startup to the Unicode version
  1968. READ-FILEW.
  1969.  
  1970.     See WRITE-FILE
  1971.  
  1972. READ-FILEA    ; c-addr u1 fileid -- u2 ior (== 0 | system err)    NONSTANDARD-WORDLIST
  1973.     ASCII version of READ-FILE.
  1974.  
  1975. READ-FILEW    ; c-addr u1 fileid -- u2 ior (== 0 | system err)    NONSTANDARD-WORDLIST
  1976.     Unicode version of READ-FILE.
  1977.  
  1978. RECURSE     ; --                    FORTH-WORDLIST    CORE EXT
  1979.     Append to the current definition under construction a runtime call to the head
  1980. of that same definition. For example, the definition 
  1981.  
  1982.     : TILL-ZERO ( n -- 0) DUP 0> IF 1- RECURSE ELSE DUP 0< IF 1+ RECURSE THEN THEN ;
  1983.  
  1984. will turn any number to zero, providing the return stack doesn't overflow first with
  1985. the level of nesting (one entry per recursive call).
  1986.  
  1987. REFILL        ; -- flag                FORTH-WORDLIST    CORE, BLOCK
  1988.     Get another input buffer full of input, return TRUE for success and 0 for failure.
  1989. If BLK is zero (0) this is a request for another line of input from the user.
  1990. If BLK is non-zero, REFILL effectively means BLK @ 1+ LOAD.
  1991.  
  1992. RELOAD        ; "ccc< >" -- ior            SYSTEM-WORDLIST
  1993.     Parse a filename and open it as a saved user image and reload it.
  1994.  
  1995.     NOTE!!! Use only on the command shell command line when invoking Jax4th, because
  1996. RELOAD continues parsing the input stream. If you use it from within the Forth interpreter,
  1997. there will be "stuff" left in the restored terminal input buffer, which probably won't be
  1998. what you meant to interpret.
  1999.  
  2000.     For reloading a user image from within Jax4th itself, use RELOAD-FILE or RELOADED, q.v.
  2001.  
  2002. RELOAD-FILE    ; i*x fid -- j*x u ior            SYSTEM-WORDLIST
  2003.     Reload the file specificed by fid as a user image. This will be the last word parsed
  2004. and executed on the Forth input line in which it is found interpretively, as images are saved
  2005. with the input specification set to an empty TIB.
  2006.  
  2007.     The returns from RELOAD-FILE are the bytes (not chars) read in the file read operation,
  2008. and the ioresult from the file read operation.
  2009.  
  2010.     To reload an image and then execute a command, compile RELOAD-FILE into a definition
  2011. and then execute that definition.
  2012.  
  2013.     See also: RELOAD RELOADED
  2014.  
  2015. RELOADED    ; c-addr u -- u ior1 ior2            SYSTEM-WORDLIST
  2016.     Reload the file whose name is specified by c-addr u as a user image. This will be the
  2017. last word parsed and executed on the Forth input line in which it is found interpretively, as
  2018. images are saved with the input specification set to an empty TIB.
  2019.  
  2020.     The returns from RELOADED are the bytes (not chars) read in the file read operation,
  2021. the ioresult from the file read operation, and ioresult from the file close operation.
  2022.  
  2023.     To reload an image and then execute a command, compile RELOADED into a definition
  2024. and then execute that definition.
  2025.  
  2026.     See also: RELOAD-FILE RELOAD
  2027.  
  2028. REPEAT        ; orig dest --                FORTH-WORDLIST    CORE
  2029.     Consume an orig and dest from the control flow stack and use them to calculate and
  2030. fix up the information provided and required by the providers of orig and dest. dest is the
  2031. point to which the REPEAT will branch back when encountered at runtime. orig is the information
  2032. for the position and which branch information for the execution cell beyond the REPEAT is located
  2033. for a forward-branching test.
  2034.  
  2035.     See: AGAIN BEGIN UNTIL WHILE
  2036.  
  2037. REPOSITION-FILE    ; ud fileid -- ior ( == 0 | system err)    FORTH-WORDLIST    FILE
  2038.     Move file pointer to position ud in file described by fileid. This
  2039. is a deferred word and is vectored at startup to the Unicode version
  2040. REPOSITION-FILEW.
  2041.  
  2042.     See FILE-POSITION
  2043.  
  2044. REPOSITION-FILEA    ; ud fileid -- ior ( == 0 | system err)    NONSTANDARD-WORDLIST
  2045.     ASCII version of REPOSITION-FILE.
  2046.  
  2047. REPOSITION-FILEW    ; ud fileid -- ior ( == 0 | system err)    NONSTANDARD-WORDLIST
  2048.     Unicode version of REPOSITION-FILE.
  2049.  
  2050. RESIZE-FILE    ; ud fileid -- ior ( == 0 | system err)    FORTH-WORLDIST    FILE
  2051.     Resize the file represented by fileid to the size ud. The contents of
  2052. any previously unwritten extent if the file size is thus increased are undefined.
  2053. This is a deferred word and is vectored at startup to the Unicode version
  2054. REPOSITION-FILEW.
  2055. See FILE-SIZE
  2056.  
  2057. RESIZE-FILEA    ; ud fileid -- ior ( == 0 | system err)    NONSTANDARD-WORDLIST
  2058.     ASCII version of RESIZE-FILE.
  2059.  
  2060. RESIZE-FILEW    ; ud fileid -- ior ( == 0 | system err)    NONSTANDARD-WORDLIST
  2061.     Unicode version of RESIZE-FILE.
  2062.  
  2063. RESTORE-CON    ; x1 .. xn --                INTERNALS-WORDLIST
  2064.     Restore certain Console session items saved by SAVE-CON, q.v.
  2065.  
  2066. RESTORE-INPUT    ; xn .. x1 n     --            FORTH-WORDLIST    CORE EXT
  2067.     Restore the input specification from the items deposited on the data stack
  2068. by SAVE-INPUT, q.v.
  2069.  
  2070. ROT        ; x1 x2 x3 -- x2 x3 x1            FORTH-WORDLIST    CORE
  2071.     Rotate third-on-data-stack to first-on-data-stack.
  2072.  
  2073. RP!        ; abs-addr --                NONSTANDARD-WORDLIST
  2074.     Set the value of the return stack pointer to abs-addr.
  2075.  
  2076. RP@        ; -- abs-addr                NONSTANDARD-WORDLIST
  2077.     Get the value of the return-stack pointer.
  2078.  
  2079. RSHIFT        ; x1 u -- x2                FORTH-WORDLIST    CORE
  2080.     Shift x1 right by u places, filling in zeroes to the left.
  2081.  
  2082. S"        ; Interp: "ccc<"> -- c-addr u    Compile: -- "ccc<"> Execute: -- c-addr u    FORTH-WORDLIST
  2083.     S" parses up to the next delimiting double-quote character. If interpreting, S" places the result in a temporary
  2084. buffer and places the string address and its count on the stack. The buffer itself is overwritten by the next occurence of
  2085. an interpretive S". If compiling, S" aligns data space, then allots data space and moves the parsed string into that
  2086. alloted space, then appends to the current definition the code to place the address and count of the string on the stack at
  2087. runtime. Not included in the count in either case is a null terminator appended to make interfacing with the NT system
  2088. easier.
  2089.  
  2090.     The size of the temporary buffer used for interpretive S" is 256 characters. Since one character is used for the
  2091. string count, and one character is used for the null pad, the maximum string length for interpretive S" is 254 characters.
  2092. If this count is exceeded, the buffer will overflow silently into data space, with undefined results.
  2093.  
  2094.     The size of a compiled S" string is limited to (2^16)-1 characters, or the size of remaining data space, whichever
  2095. is less. If the string exceeds this size, the results are undefined.
  2096.  
  2097. S>D        ; n1 -- d1                FORTH-WORDLIST    CORE
  2098.     Convert signed single n1 to signed double d1 on the data stack.
  2099.  
  2100. SAVE-BUFFERS    ; --                    FORTH-WORDLIST    BLOCK
  2101.      Write all UPDATEd block buffers to disk.
  2102.     A Forth file i/o THROW -37 will occur if the value in BLOCK-FILE is zero (0). A Block Read
  2103. THROW -33 will occur if the file handle in BLOCK-FILE is invalid. A Block Write THROW -34 will occur if an updated
  2104. buffer was waiting to be written but the operation failed. An invalid BLOCK number THROW -35 will occur if u is not
  2105. a valid BLOCK number in the BLOCK-FILE file.
  2106.  
  2107.  
  2108. SAVE-CON    ; -- x1 .. xn                INTERNALS-WORDLIST
  2109.     Save certain Console session items for later restore by RESTORE-CON, q.v.
  2110.  
  2111. SAVE-FORTH    ; -- 0|ior                NONSTANDARD-WORDLIST
  2112.     Brings up a requester for a file name to save the current image of the user dictionary and
  2113. data space. Returns 0 if successful, or an I/O error code ior if failed. If ior is non-zero and
  2114. matches the value of LastError (if read in an atomic operation with SAVE-FORTH ... LastError
  2115. is altered by Console I/O), then ior is a return from the file open or write operation. If ior
  2116. doesn't match LastError read in an atomic operation with SAVE-FORTH then ior is the return from
  2117. GetCmdDlgExtendedError() and the file requester dialog failed.
  2118.  
  2119.     SAVE-FORTH or any word containing SAVE-FORTH is the last word parsed on the line in which
  2120. it is encountered by the interpreter. If any processing is desired at the same time as SAVE-FORTH
  2121. then SAVE-FORTH should be compiled into a higher-level word.
  2122.  
  2123.     See: RELOAD RELOAD-FILE RELOADED
  2124.  
  2125. SAVE-INPUT    ; -- xn .. x1 n                FORTH-WORDLIST    CORE EXT
  2126.     Save items representing the current input specification on the stack topped by the
  2127. number of items thus saved. Input specification can be restored by RESTORE-INPUT, q.v.
  2128.  
  2129.  
  2130. SAVEDEPTH    ; i*x -- i*x                INTERNALS-WORDLIST
  2131.     Stores internally the depth of the data stack.
  2132.  
  2133. SCAN        ; ( c-addr1 u1 char --- c-addr2 u2)    NONSTANDARD-WORDLIST
  2134.     Seek char in the string specified by c-addr1 u1 and return c-addr2 u2
  2135. specifying the string remaining starting with the first occurence of the character.
  2136.  
  2137. SCR        ; -- a-addr                FORTH-WORDLIST    BLOCK EXT
  2138.     Variable holding the last LISTed block file screen.
  2139.  
  2140. SEARCH-WORDLIST ; c-addr u wid -- 0 | xt 1 | xt -1)    FORTH-WORDLIST    SEARCH
  2141.     Search for c-addr u as a name in wordlist wid, returning zero (0) if not
  2142. found, or xt the execution token for the word if found with 1 if IMMEDIATE and -1 if not.
  2143.  
  2144. SET-CURRENT    ; wid --                FORTH-WORDLIST SEARCH
  2145.     Make the wordlist represented by wid the current compilation wordlist.
  2146.  
  2147. SET-ORDER    ; wid1 .. widn n --            FORTH-WORDLIST SEARCH
  2148.     Reset the dictionary search order to the order specified by wid1 thru
  2149. widn for a search-order length of n.
  2150.  
  2151. SetConsoleMode    ; x -- LastErr | TRUE            SYSTEM-WORDLIST
  2152.     Set the NT console mode of Jax4th to the value specified by x.
  2153.  
  2154.     See: The constants above whose names start with ENABLE_
  2155.  
  2156. SIGN        ; n --                    FORTH-WORDLIST
  2157.     Within a <# ... #> expression, prepend a minus sign to the current
  2158. pictured numeric output string if n is negative.
  2159.  
  2160. SKIP        ; ( c-addr1 u1 char --- c-addr2 u2)    NONSTANDARD-WORDLIST
  2161.     Index through c-addr1 u1 until the first character not matching char
  2162. is found. Return the remaining string.
  2163.  
  2164. SLITERAL    ; c-addr1 u    Execution: -- c-addr2 u    FORTH-WORDLIST    STRING
  2165.  
  2166. SM/REM        ; d1 n1 -- n2 n3            FORTH-WORDLIST    CORE
  2167.     Return the result of symmetrical division of signed single n1 upon signed double d1
  2168. as quotient n3 and remainder n2.
  2169.  
  2170. SOURCE        ; -- c-addr u                FORTH-WORDLIST    CORE
  2171.     Return the address and count of the current input stream.
  2172.  
  2173. SOURCE-ID    ; -- a-addr                FORTH-WORDLIST    CORE, FILE
  2174.     Returns 0 if interpreting, -1 if EVALUATEing and file-id if interpreting from
  2175. a FILE.
  2176.  
  2177. SP!        ; abs-addr --                NONSTANDARD-WORDLIST
  2178.     Set the data stack poitner to abs-addr.
  2179.  
  2180. SP0        ; -- a-addr                NONSTANDARD-WORDLIST
  2181.     Variable containing the initial value of the data stack pointer.
  2182.  
  2183. SP@        ; -- abs-addr                NONSTANDARD-WORDLIST
  2184.     Return the current contents of the data stack pointer.
  2185.  
  2186. SPACE        ; --                    FORTH-WORDLIST    CORE
  2187.     Emit one (1) space to the current output device.
  2188.  
  2189. SPACES        ; n --                    FORTH-WORDLIST    CORE
  2190.     Emit n spaces to the current output device.
  2191.  
  2192. STATE        ; -- a-addr                FORTH-WORDLIST    CORE
  2193.     Variable containing TRUE if compiling, FALSE otherwise.
  2194.  
  2195. STATEABORT    ; --                    INTERNALS-WORDLIST
  2196.     THROW -14 (interpreting a compile-only word).
  2197.  
  2198. StdErr        ; -- a-addr                SYSTEM-WORDLIST
  2199.     Holds the NT console handle for Jax4th's standard err.
  2200.  
  2201. StdIn        ; -- a-addr                SYSTEM-WORDLIST
  2202.     Holds the NT console handle for Jax4th's standard in.
  2203.  
  2204. StdOut        ; -- a-addr                SYSTEM-WORDLIST
  2205.     Holds the NT console handle for Jax4th's standard out.
  2206.  
  2207. SYSTEM-WORDLIST    ; -- wid                FORTH-WORDLIST
  2208.     Wordlist of words used to access the host system.
  2209.  
  2210. SWAP        ; x1 x2 -- x2 x1            FORTH-WORDLIST    CORE
  2211.     Exchange top two data stack items.
  2212.  
  2213. SYSCALL        ; abs-addr -- edx eax
  2214.  
  2215.     Performs a call to abs-addr and returns, pushing EDX and EAX which are used by DLL calls for returns. Does no
  2216. sanity checking on stack or on abs-addr.
  2217.  
  2218. THEN        ; --                    FORTH-WORDLIST
  2219.     At compile time, consume an "origin" from the control-flow stack. At runtime,
  2220. do nothing but serve as the exit point from a control flow construct in which THEN is
  2221. appropriate.
  2222.  
  2223. THROW        ; k*x n -- k*x | i*x n            FORTH-WORDLIST    EXCEPTION
  2224.     Toss an exception to the sytactically enclosing CATCH frame, or lacking one,
  2225. to the default Forth exeception frame.
  2226.  
  2227. THRU        ; i*x u1 u2 -- j*x            FORTH-WORDLIST    BLOCK EXT
  2228.     LOAD BLOCKs u1 through u2 one at a time.
  2229.  
  2230. TIB        ; -- c-addr                FORTH-WORDLIST    CORE EXT
  2231.     Return the address of the terminal input buffer.
  2232.  
  2233. TOKENTODATA    ; linkt|xt -- a-addr            IMPLEMENTATION-WORDLIST
  2234.     Convert an execution or link token to its corresponding data-relative address.
  2235.  
  2236. TRUE        ; -- flag                FORTH-WORDLIST    CORE EXT
  2237.     All bits set.
  2238.  
  2239. TUCK        ; x1 x2 -- x2 x1 x2            FORTH-WORDLIST    CORE EXT
  2240.     Copy the top data stack item under the second data stack item.
  2241.  
  2242. TYPE        ; c-addr u --                FORTH-WORDLIST    CORE
  2243.     Display the character string represented by c-addr u to the current output device.
  2244.  
  2245. U.        ; u --                    FORTH-WORDLIST CORE
  2246.     Display the unsigned number u on the current output device.
  2247.  
  2248. U.R        ; u n --                NONSTANDARD-WORDLIST
  2249.     Display the unsigned number u on the current output device right-justified to n places.
  2250.  
  2251. U<        ; u1 u2 -- flag                FORTH-WORDLIST    CORE
  2252.     True if unsigned u1 is less than unsigned u2.
  2253.  
  2254. UD*U        ; ud1 u1 -- ud2                NONSTANDARD-WORDLIST
  2255.     Multiply unsigned double ud1 by unsigned single u2 with the result being
  2256. unsigned double u2.
  2257.  
  2258. UD.        ; ud --                    NONSTANDARD-WORDLIST
  2259.     Display the unsigned double number ud on the current output device.
  2260.  
  2261. UD.R        ; ud n --                NONSTANDARD-WORDLIST
  2262.     Display the unsigned double number ud on the current output device right-justified to n places.
  2263.  
  2264. UD<        ; ud1 ud2 -- flag            NONSTANDARD-WORDLIST
  2265.     flag is TRUE iff ud2 is greater unsigned than ud1.
  2266.  
  2267. UDMIN        ; ud1 ud2 -- ud1|ud2            NONSTANDARD-WORDLIST
  2268.     Returns the minimum of two unsigned double numbers.
  2269.  
  2270. UM*        ; u1 u2 -- ud                FORTH-WORDLIST    CORE
  2271.     Unsigned multiply of u1 by u2 leaves unsigned double ud.
  2272.  
  2273. UM/MOD        ; ud u1 -- u2 u3            FORTH-WORDLIST    CORE
  2274.     u3 is the quotient and u2 the modulus of unsigned division performed
  2275. on ud2 by u1.
  2276.  
  2277. UNFOUND     ; --                    INTERNALS-WORDLIST
  2278.     Error handler for a word not found in a dictionary search during interpretation
  2279. or compilation.
  2280.  
  2281. UNICODE        ; b-addr u -- addr
  2282.     Copies an ASCII string specified by c-addr u as a null-terminated UNICODE string into a system buffer whose
  2283. address is then returned. This system buffer is overwritten each time ASCIIZ is called. The buffer is 128 Unicode
  2284. characters long, and the null terminator will use up one of these character addresses, so the maxiumum value for the
  2285. argument  u  is thus 127.
  2286.  
  2287. UNLOOP        ; --    R: loop-sys --        FORTH-WORDLIST        CORE
  2288.     Clear the loop stack of the data for the innermost enclosing loop.
  2289.  
  2290. UNNEST        ; -- x    R: nest-sys --        NONSTANDARD-WORDLIST
  2291.     Same as EXIT.
  2292.  
  2293. UNRESOLVED    ; --                INTERNALS-WORDLIST
  2294.     Error handler for a branch left unresolved during compilation.
  2295.  
  2296. UNTIL        ; flag --            FORTH-WORDLIST    CORE
  2297.     Branches back to the syntactically corresponding BEGIN if flag
  2298. is FALSE, procedes onwards if flag is TRUE.
  2299.  
  2300. UPDATE        ; --                FORTH-WORDLIST    BLOCK
  2301.     Cause the most-recently-accessed BLOCK buffer to be marked
  2302. as updated, causing it to be written to disk on the next SAVE-BUFFERS
  2303. or FLUSH operation, or when the buffer is reused.
  2304.  
  2305. USERTOKEN?    ; xt -- flag            INTERNALS-WORDLIST
  2306.     Returns TRUE if xt is an execution token of a type matching
  2307. those for a user-defined word.
  2308.  
  2309. VARIABLE    ; "name" --            FORTH-WORDLIST    CORE
  2310.     Create a variable named "name" which at runtime will
  2311. push its data address on the data stack.
  2312.  
  2313. W/O        ; -- x                FORTH-WORDLIST
  2314.     Used with OPEN-FILE q.v. to signify write-only access.
  2315.  
  2316. WORDLIST    ; -- wid            FORTH-WORDLIST    SEARCH
  2317.     Create a wordlist to which dictionary entries may be appended,
  2318. and which may be placed in the search order. Jax4th for Windows NT also
  2319. provides a mechanism whereby named wordlists may be created, for user
  2320. convenience, although this is not a standard feature.
  2321.  
  2322.     Here we will discuss the internal structure of a wordlist in
  2323. Jax4th. These are not standard issues: this is merely the way Jax4th
  2324. implements wordlists. The fact that the wordlist we will examine for
  2325. an example happens to be a named wordlist is not important in this context.
  2326.  
  2327.     First of all, a wordslist's "wid" (wordlist identifier, the
  2328. stack entry representing a wordlist) is a data address representing
  2329. an address in user code space.  By placing the wid of FORTH-WORDLIST
  2330. (a Standard wordlist) on the stack and doing a dump some address units
  2331. back, we (coincidentally) find the header in the dictionary and all
  2332. the rest of the information stored for the FORTH-WORDLIST except the
  2333. pointer to the last entry in the wordlist.
  2334.  
  2335. HEX ok
  2336. FORTH-WORDLIST 20 - 20 DUMP
  2337.  
  2338. Address  0100 0302 0504 0706 0908 0B0A 0D0C 0F0E Unicode
  2339. 002C2210 FFFF 000E 0046 004F 0052 0054 0048 002D  .FORTH-
  2340. \             ^count  ^name field
  2341. 002C2220 0057 004F 0052 0044 004C 0049 0053 0054 WORDLIST
  2342. \         ^rest of name field (remember this is unicode)
  2343. 002C2230 1118 0040 0038 0000 0000 0000 37AC 0040 .@8...¼@
  2344. \        ^execution ^pointer   ^back     ^link pointer to next
  2345. \         engine     to thread  pointer   word in dictionary
  2346.                                 to previous
  2347.                                 wordlist
  2348.  ok
  2349.  
  2350.     (The actual addresses are specific to the revision of Jax4th from
  2351. which the example was taken.)
  2352.  
  2353.     We see that in the example, FORTH-WORDLIST has its name count starting
  2354. at 2c2210 (the FFFF is a marker in a Jax4th count field). The count is Oe (14)
  2355. characters: FORTH-WORDLIST. The execution engine for FORTH-WORDLIST has a token
  2356. of 00401118 (remember, this is Intel architecture). After the execution engine
  2357. is a pointer to data space where the thread pointer is located. The thread
  2358. pointer points to the most recently defined word in this wordlist. Following
  2359. the thread pointer is a back pointer to the previous wordlist which had been
  2360. the last defined wordlist at the time that FORTH-WORDLIST was defined. In this
  2361. case that pointer is 00000000 since the FORTH-WORDLIST was the first wordlist
  2362. defined. Had there been a link there, it would have been an absolute address
  2363. of the wordlist link pointer in the previous wordlist. After that, we see that
  2364. the DUMP display includes coincidentally the link pointer for the next entry
  2365. in the dictionary, whatever that happens to be, but this has no signficance
  2366. to our discussion of wordlists or the FORTH-WORDLIST.
  2367.  
  2368.     Named wordlists created by NAMEWORDLIST (q.v.) are no different in
  2369. their internal structure than a wordlist created by WORDLIST. The only
  2370. difference is that a NAMEWORDLIST has a regular Forth name header and a
  2371. WORDLIST is created with a header that tells the Jax4th interpreter that
  2372. it is a "headerless" item in the dictionary.
  2373.  
  2374. WORDLISTS    ; --
  2375.     Displays all wordlists in the system, both system and user wordlists.
  2376. In the example below, there are four (4) system wordlists, one anonymous
  2377. user wordlist (the "normal" kind of wordlist) and a NAMEWORDLIST called
  2378. ARFARF.
  2379.  
  2380. WORDLISTS
  2381.  
  2382. Wordlists:
  2383. FFFF0030 named ARFARF
  2384. FFFF0010 named
  2385.   2C22D8 named SYSTEM-WORDLIST
  2386.   2C22A4 named NONSTANDARD-WORDLIST
  2387.   2C2268 named INTERNALS-WORDLIST
  2388.   2C2230 named FORTH-WORDLIST
  2389.  ok
  2390.  
  2391. WHILE        ; flag --        FORTH-WORDLIST    CORE
  2392.     At compile time, take a "dest" and replace it with an "orig dest"
  2393. pair on the control flow stack for later resolution, e.g., by REPEAT (q.v.).
  2394.  
  2395.     At runtime, consume a flag and iff false, branch away just past
  2396. corresponding REPEAT.
  2397.  
  2398. WITHIN        ; n|u1 n|u2 n|u3 -- flag            FORTH-WORDLIST    CORE EXT
  2399.  
  2400. WORD        ; ( char "ccc<char>" -- c-addr)            FORTH-WORDLIST    CORE
  2401.  
  2402. WRITE-FILE    ; c-addr u fileid -- ior (== 0 | system err)    FORTH-WORDLIST    FILE
  2403.     Write u characters starting from c-addr to the file represented by fileid.
  2404. Returns Windows NT LastError or 0 for success. This is a deferred word and is vectored
  2405. at startup to the Unicode version WRITE-FILEW.
  2406. See READ-FILE
  2407.  
  2408. WRITE-FILEA    ; c-addr u fileid -- ior (== 0 | system err)    NONSTANDARD-WORDLIST
  2409.     ASCII version of WRITE-FILE.
  2410.  
  2411. WRITE-FILEW    ; c-addr u fileid -- ior (== 0 | system err)    NONSTANDARD-WORDLIST
  2412.     Unicode version of WRITE-FILE.
  2413.  
  2414. XOR        ; x1 x2 -- x3                    FORTH-WORDLIST    CORE
  2415.     x3 is the bitwise exclusive-or of x1 x2.
  2416.  
  2417. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2418. ~ End of JAX4TH.DOC        ~
  2419. ~    Jack Woehr        ~
  2420. ~    Golden, Colorado    ~
  2421. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2422.  
  2423.